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">
      <providers>
        <add name="RegisterMembershipProvider"
             type="System.Web.Security.SqlMembershipProvider"
             connectionStringName="RegisterDB"
             applicationName="RegisterProject"
             minRequiredPasswordLength="5"
             minRequiredNonalphanumericCharacters="0" />
      </providers>
    </membership>

    <roleManager enabled="true" defaultProvider="RegisterRoleProvider">
      <providers>
        <add name="RegisterRoleProvider"
             type="System.Web.Security.SqlRoleProvider"
             connectionStringName="RegisterDB" />
      </providers>
    </roleManager>

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?
mlwils0Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
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.
0
 
QPRCommented:
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.
0
All Courses

From novice to tech pro — start learning today.