Got more questions? Find advice on: SQL | XML | Regular Expressions | Windows
in Search
Welcome to AspAdvice Sign in | Join | Help

Membership Database Authentication Problem

Last post 07-21-2008, 9:44 AM by doug.spencer. 1 replies.
Sort Posts: Previous Next
  •  07-20-2008, 11:30 AM 44372

    Membership Database Authentication Problem

    I am really struggling with something here.
    I have an ASPNETDB database which I have attached to a SQL Server 2005 server on a remote machine.
    I have set up the db with all the appropriate membership and role information.
    If I browse the site I used the database with, on the server, I am able to authenticate properly. But if I browse to it from another computer, I cannot authenticate at all.
    The wierd part is, if I used bogus credentials on the remote computer, I get the red "Invalid User" error message, but if I use the right credentials, i dont get that error message, but am redirected back to my login page.
    Here is my web.config file:

    <?xml version="1.0" encoding="utf-8"?>

    <configuration>

    <configSections>

    xml version="1.0" encoding="utf-8"?>

    <configuration>

    <configSections>

    configuration>

    <configSections>

    configSections>

     

    <connectionStrings>

    <remove name="Local" />

    <add name="aspnetdb" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;Initial Catalog=aspnetdb;"/>

    </connectionStrings>

    <system.web>

    <authorization>

    <deny users="?"/>

    <allow users="*" />

    </authorization>

    <httpRuntime maxRequestLength="256000"/>

    <pages>

    </pages>

    <customErrors mode="Off"/>

    <compilation debug="true">

    connectionStrings>

    <remove name="Local" />

    <add name="aspnetdb" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;Initial Catalog=aspnetdb;"/>

    </connectionStrings>

    <system.web>

    <authorization>

    <deny users="?"/>

    <allow users="*" />

    </authorization>

    <httpRuntime maxRequestLength="256000"/>

    <pages>

    </pages>

    <customErrors mode="Off"/>

    <compilation debug="true">

    remove name="Local" />

    <add name="aspnetdb" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;Initial Catalog=aspnetdb;"/>

    </connectionStrings>

    <system.web>

    <authorization>

    <deny users="?"/>

    <allow users="*" />

    </authorization>

    <httpRuntime maxRequestLength="256000"/>

    <pages>

    </pages>

    <customErrors mode="Off"/>

    <compilation debug="true">

    add name="aspnetdb" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;Initial Catalog=aspnetdb;"/>

    </connectionStrings>

    <system.web>

    <authorization>

    <deny users="?"/>

    <allow users="*" />

    </authorization>

    <httpRuntime maxRequestLength="256000"/>

    <pages>

    </pages>

    <customErrors mode="Off"/>

    <compilation debug="true">

    connectionStrings>

    <system.web>

    <authorization>

    <deny users="?"/>

    <allow users="*" />

    </authorization>

    <httpRuntime maxRequestLength="256000"/>

    <pages>

    </pages>

    <customErrors mode="Off"/>

    <compilation debug="true">

    system.web>

    <authorization>

    <deny users="?"/>

    <allow users="*" />

    </authorization>

    <httpRuntime maxRequestLength="256000"/>

    <pages>

    </pages>

    <customErrors mode="Off"/>

    <compilation debug="true">

    authorization>

    <deny users="?"/>

    <allow users="*" />

    </authorization>

    <httpRuntime maxRequestLength="256000"/>

    <pages>

    </pages>

    <customErrors mode="Off"/>

    <compilation debug="true">

    deny users="?"/>

    <allow users="*" />

    </authorization>

    <httpRuntime maxRequestLength="256000"/>

    <pages>

    </pages>

    <customErrors mode="Off"/>

    <compilation debug="true">

    allow users="*" />

    </authorization>

    <httpRuntime maxRequestLength="256000"/>

    <pages>

    </pages>

    <customErrors mode="Off"/>

    <compilation debug="true">

    authorization>

    <httpRuntime maxRequestLength="256000"/>

    <pages>

    </pages>

    <customErrors mode="Off"/>

    <compilation debug="true">

    httpRuntime maxRequestLength="256000"/>

    <pages>

    </pages>

    <customErrors mode="Off"/>

    <compilation debug="true">

    pages>

    </pages>

    <customErrors mode="Off"/>

    <compilation debug="true">

    </pages>

    <customErrors mode="Off"/>

    <compilation debug="true">

    customErrors mode="Off"/>

    <compilation debug="true">

    compilation debug="true">

    </compilation>

    compilation>

    <authentication mode="Forms">

    <forms name="AuthCookie" loginUrl="loginpage.aspx" defaultUrl="configdefault.aspx" timeout="100" />

    </authentication>

    <roleManager enabled="true" defaultProvider="SqlMembershipProvider" cookieProtection="All">

    <providers>

    <clear />

    <add

    authentication mode="Forms">

    <forms name="AuthCookie" loginUrl="loginpage.aspx" defaultUrl="configdefault.aspx" timeout="100" />

    </authentication>

    <roleManager enabled="true" defaultProvider="SqlMembershipProvider" cookieProtection="All">

    <providers>

    <clear />

    <add

    forms name="AuthCookie" loginUrl="loginpage.aspx" defaultUrl="configdefault.aspx" timeout="100" />

    </authentication>

    <roleManager enabled="true" defaultProvider="SqlMembershipProvider" cookieProtection="All">

    <providers>

    <clear />

    <add

    authentication>

    <roleManager enabled="true" defaultProvider="SqlMembershipProvider" cookieProtection="All">

    <providers>

    <clear />

    <add

    roleManager enabled="true" defaultProvider="SqlMembershipProvider" cookieProtection="All">

    <providers>

    <clear />

    <add

    providers>

    <clear />

    <add

    clear />

    <add

    add

    name="SqlMembershipProvider"

    name="SqlMembershipProvider"

    type="System.Web.Security.SqlRoleProvider"

    type="System.Web.Security.SqlRoleProvider"

    connectionStringName="aspnetdb"

    connectionStringName="aspnetdb"

    applicationName="/"

    applicationName="/"

    />

     

    </providers>

    </roleManager>

    <membership defaultProvider="SqlMembershipProvider" userIsOnlineTimeWindow="15">

    <providers>

    <clear />

    <add

    providers>

    </roleManager>

    <membership defaultProvider="SqlMembershipProvider" userIsOnlineTimeWindow="15">

    <providers>

    <clear />

    <add

    roleManager>

    <membership defaultProvider="SqlMembershipProvider" userIsOnlineTimeWindow="15">

    <providers>

    <clear />

    <add

    membership defaultProvider="SqlMembershipProvider" userIsOnlineTimeWindow="15">

    <providers>

    <clear />

    <add

    providers>

    <clear />

    <add

    clear />

    <add

    add

    name="SqlMembershipProvider"

    name="SqlMembershipProvider"

    type="System.Web.Security.SqlMembershipProvider"

    type="System.Web.Security.SqlMembershipProvider"

    connectionStringName="aspnetdb"

    connectionStringName="aspnetdb"

    applicationName="/"

    applicationName="/"

    enablePasswordRetrieval="false"

    enablePasswordRetrieval="false"

    enablePasswordReset="true"

    enablePasswordReset="true"

    requiresQuestionAndAnswer="true"

    requiresQuestionAndAnswer="true"

    requiresUniqueEmail="true"

    passwordFormat="Hashed" />

    </providers>

    </membership>

    </system.web>

     

    <system.webServer>

    <validation validateIntegratedModeConfiguration="false"/>

    </system.webServer>

    </configuration>

    requiresUniqueEmail="true"

    passwordFormat="Hashed" />

    </providers>

    </membership>

    </system.web>

     

    <system.webServer>

    <validation validateIntegratedModeConfiguration="false"/>

    </system.webServer>

    </configuration>

    passwordFormat="Hashed" />

    </providers>

    </membership>

    </system.web>

     

    <system.webServer>

    <validation validateIntegratedModeConfiguration="false"/>

    </system.webServer>

    </configuration>

    providers>

    </membership>

    </system.web>

     

    <system.webServer>

    <validation validateIntegratedModeConfiguration="false"/>

    </system.webServer>

    </configuration>

    membership>

    </system.web>

     

    <system.webServer>

    <validation validateIntegratedModeConfiguration="false"/>

    </system.webServer>

    </configuration>

    system.web>

     

    <system.webServer>

    <validation validateIntegratedModeConfiguration="false"/>

    </system.webServer>

    </configuration>

    system.webServer>

    <validation validateIntegratedModeConfiguration="false"/>

    </system.webServer>

    </configuration>

    validation validateIntegratedModeConfiguration="false"/>

    </system.webServer>

    </configuration>

    </system.webServer>

    </configuration>

    configuration>

    Any ideas?

  •  07-21-2008, 9:44 AM 44405 in reply to 44372

    Re: Membership Database Authentication Problem

    Update To This Post:

    After lots of searching, I have found the problem.  There was actually nothing wrong with my configuration or code.  When I set up the remote server, I put a "_" in the name of the server, and apparently this is not a valid name that IE will send cookies to.  I renamed the server, and everything works fine.

View as RSS news feed in XML