Login unsucessful / Membership credential verification failed.

Last post 08-29-2006 1:10 PM by lifflander. 2 replies.

Sort Posts:

  • Login unsucessful / Membership credential verification failed.

    08-24-2006, 12:36 PM
    • Member
      15 point Member
    • lifflander
    • Member since 08-24-2006, 12:22 PM
    • Posts 3

    Our login control works perfectly when we're in the dev environment. However, once we copied the website to our remote server, the login control stoppped working. The user is in the database and the password is correct but it still gives us the error message: "Your login attempt was not successful. Please try again." And in the event long we get the following error: "Membership credential verification failed."

    We have looked at this link: http://weblogs.asp.net/scottgu/archive/2006/04/22/443634.aspx, but in our web.config file we didn't have the membership section. We added this part and tried to set the application name but it didn't seem to help. In the database, ASPNETDB.MDF, under the application table the path is set for just /. We don't know whether this is the problem but we've tried changing it and also changing the application name in the web.config file but this did not help.

    Finally, we created a new website with just a login control. We added one user and it worked just fine in the dev environment. However, once we moved this website to the remote server it stopped working giving us the same error message as before. We didn't touch the web.config file at all. Do we have to add a membership section when we use a login control? By the way, we're not using roles in this website.

    Thanks

  • Re: Login unsucessful / Membership credential verification failed.

    08-24-2006, 4:00 PM
    • Member
      55 point Member
    • HardCode_
    • Member since 09-13-2004, 11:40 AM
    • Posts 11
    Interestingly, I am just learning this stuff too, and only this morning I found a solution to the application name only containing "/". I had the <membership> section in my web.config, but when I set up roles and users using the ASP.NET Configuration tool in VS.NET, this wasn't enough. I copied these other sections from machine.config and added them to my web.config. Make sure to set up your LocalSqlSever "variable" in your web.config, too, unless you want the default one that points to SQL Server 2005 Express as defined in machine.config. Note that since I really don't yet understand all of this, I *SNIP*'ed those PublicKeyToken values, whether or not I need to :)


     
    <membership>
          <providers>
            <remove name="AspNetSqlMembershipProvider"/>
            <add name="AspNetSqlMembershipProvider"
                 type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=*SNIP*"
                 connectionStringName="LocalSqlServer"
                 enablePasswordRetrieval="true"
                 enablePasswordReset="true"
                 requiresQuestionAndAnswer="false"
                 applicationName="usercp"
                 requiresUniqueEmail="true"
                 passwordFormat="Clear"
                 maxInvalidPasswordAttempts="5"
                 minRequiredPasswordLength="6"
                 minRequiredNonalphanumericCharacters="0"
                 passwordAttemptWindow="5"
                 passwordStrengthRegularExpression="" />
          </providers>
        </membership>
        <profile>
          <providers>
            <remove name="AspNetSqlProfileProvider"/>
            <add name="AspNetSqlProfileProvider" 
                 connectionStringName="LocalSqlServer" 
                 applicationName="usercp" 
                 type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=*SNIP*" />
          </providers>
        </profile>
        <roleManager enabled="true">
          <providers>
            <remove name="AspNetSqlRoleProvider"/>
            <add name="AspNetSqlRoleProvider" 
                 connectionStringName="LocalSqlServer" 
                 applicationName="usercp" 
                 type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=*SNIP*" />
    
            <remove name="AspNetWindowsTokenRoleProvider"/>
            <add name="AspNetWindowsTokenRoleProvider" 
                 applicationName="usercp" 
                 type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=*SNIP*" />
          </providers>
        </roleManager>
     
  • Re: Login unsucessful / Membership credential verification failed.

    08-29-2006, 1:10 PM
    • Member
      15 point Member
    • lifflander
    • Member since 08-24-2006, 12:22 PM
    • Posts 3

    We added the following part to the web.config file specifying the the applicationName and connectionStringName. However this did not help.

     <membership>

    <providers>

    <clear/>

    <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/vtrucker.net" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression="" />

    </providers>

    </membership>

    <profile>

    <providers>

    <clear/>

    <add name="AspNetSqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="/vtrucker.net" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

    </providers>

    </profile>

    <roleManager>

    <providers>

    <clear/>

    <add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/vtrucker.net" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

    <add name="AspNetWindowsTokenRoleProvider" applicationName="/vtrucker.net" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

    </providers>

    </roleManager>

Page 1 of 1 (3 items)