Membership and Roles On Remote Hosting Servers

I am using ASP.NET C#.  I'm hosting my site on a remote web server and a remote MSSQL 2005 server.  I setup roles and membership on the SQL server using the Registration Tool (aspnet_regsql.exe).  Then, I manipulated my root webconfig file to reflect the use of the remote SQL server:
    <authentication mode="Forms" />
    <membership defaultProvider="RegisterMembershipProvider">
        <add name="RegisterMembershipProvider"
             minRequiredNonalphanumericCharacters="0" />

    <roleManager enabled="true" defaultProvider="RegisterRoleProvider">
        <add name="RegisterRoleProvider"
             connectionStringName="RegisterDB" />

I then setup the membership, roles, and access rules using the Web Admin tool.  Then, I created a login page. Everything works fine when I run the web app. from my local computer - I am able to access the folders that I allowed for the user I login with.  But, after I upload everything to the remote server I can't access the same folder.  I am logged in to the site, but I get immediatedly redirected back to the login page.  So, technically I am logged-in but I can't access the folder. Does anyone have a clue as to why?
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

mlwils0Connect With a Mentor Author Commented:
I've resolved it.  Somehow there two enties with the same user name in the user table.  It seems to have cause a conflict.
I have not used membership like this but have had similar problems using a home made solution.
I created a web app locally that connected to a remote DB and all was fine. When I deployed the app to a remote IIS server I get login failed errors.
What I had to do (or get the network admin to do ) was to give the IIS server delegation permissions. This fixed it!
Basically your workstation asks the IIS box to serve it a file with some data from SQL server (different server). When you talk to IIS you pass credentials, IIS in turn is not able to include these credentials when requesting SQL info as it does not have delegation permissions.
This may not have anything to do with your scenario but it could explain the redirect back to the login page. Something to test for perhaps.
You could response.write whether or not the user is logged in as a test.
All Courses

From novice to tech pro — start learning today.