Why does Membership.ValidateUser () always return false?

I have an ASP.NET 2010 application. When I go through the registraiton process, I log in correctly. However, if I just try to log in later, ValidateUser always returns false '

blnSuccess = Membership.ValidateUser(strUserName, strPassword) 

I took a step to make sure that the correct username and password were sent and that this person is in db (Express). Here is my Web.Config .... Everything is just ordinary stuff.

 <connectionStrings> <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/> </connectionStrings> <authentication mode="Forms"> <forms name=".ASPXAUTH" loginUrl="~/Account/Login.aspx" protection="All" timeout="2880" slidingExpiration="true" /> </authentication> <membership> <providers> <clear/> <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/> </providers> </membership> 
0
source share

All Articles