Login works in DEV but not on server

Discussion in 'Databases' started by PharmaPAC, Aug 5, 2006.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi.My login validation works on my dev machine, but on the discountasp.net server the same code always fails the login. Here is my code:

    Connection string:



    <connectionStrings>
    <remove name="LocalSqlServer"/>
    <add name="LocalSqlServer" connectionString="Data Source=tcp:sql2k504.discountasp.net;Integrated Security=false;Initial Catalog=SQL2005_267790_ppi;User ID=SQL2005_267790_ppi_user;Password=*******" providerName="System.Data.SqlClient"/>
    </connectionStrings>

    Other web.config stuff:

    <roleManager enabled="true" />


    <authentication mode="Forms">
    <forms name=".ASPXAUTH_PPI"
    loginUrl="Login.aspx"
    protection="All"
    timeout="30"
    path="/"
    requireSSL="false"
    slidingExpiration="true"
    cookieless="UseDeviceProfile" />
    </authentication>
    <membership defaultProvider="PpiProvider">
    <providers>
    <clear />
    <add name="PpiProvider"
    minRequiredPasswordLength="5"
    minRequiredNonalphanumericCharacters="0"
    connectionStringName="LocalSqlServer"
    type="System.Web.Security.SqlMembershipProvider"/>
    </providers>
    </membership>

    from login.aspx.cs:
     
  2. Scott Gu has a tip on his blog that sounds like your problem
    here is the link



    Cause:</o:p>
    </o:p>
    The reason this usually happens is because a membership (or roles or profile) provider has been added in the application?s web.config file ? but without an applicationName attribute being specified (assume below that the applicationName in bold was missing):
    </o:p>
    <membership></o:p>
    <providers></o:p>
    <clear/></o:p>
    <add name="AspNetSqlMembershipProvider"</o:p>
    type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"</o:p>
    connectionStringName="LocalSqlServer"</o:p>
    enablePasswordRetrieval="false"</o:p>
    enablePasswordReset="true"</o:p>
    requiresQuestionAndAnswer="true"</o:p>
    requiresUniqueEmail="false"</o:p>
    passwordFormat="Hashed"</o:p>
    maxInvalidPasswordAttempts="5"</o:p>
    minRequiredPasswordLength="7"</o:p>
    minRequiredNonalphanumericCharacters="1"</o:p>
    passwordAttemptWindow="10"</o:p>
    passwordStrengthRegularExpression="" </o:p>
    applicationName="/" </o:p>
    /></o:p>
    </providers></o:p>
    </membership>
    </o:p>
    When no applicationName attribute is configured, ASP.NET uses the application vroot path within the web-server to automatically calculate the applicationName to use when adding data to an ASP.NET Application Service database. To see this in action, you can open up your ASPNETDB database, and look within the aspnet_Applications table:
    </o:p>

    kevinasp.com
     
  3. Thanks a lot! That was the problem. Good blog, too.

    Dan
     
  4. I?ve been tearing my hair out for two days, trying to solve this same problem on my site, and this was the fix I needed. Thanks a lot!
    </o:p>Lar
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page