Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy does Membership.ValidateUser() always return false?
    primarykey
    data
    text
    <p>I have an ASP.NET 2010 app. When I go through the registraiton process, I correctly get logged in. However, if I just try to log in later, ValidateUser always returns false'</p> <pre class="lang-cs prettyprint-override"><code>blnSuccess = Membership.ValidateUser(strUserName, strPassword) </code></pre> <p>I've stepped through to ensure the correct username &amp; password are being sent in and that this person is in the db (Express). Here's my Web.Config....All just regular stuff. </p> <pre class="lang-xml prettyprint-override"><code>&lt;connectionStrings&gt; &lt;add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/&gt; &lt;/connectionStrings&gt; &lt;authentication mode="Forms"&gt; &lt;forms name=".ASPXAUTH" loginUrl="~/Account/Login.aspx" protection="All" timeout="2880" slidingExpiration="true" /&gt; &lt;/authentication&gt; &lt;membership&gt; &lt;providers&gt; &lt;clear/&gt; &lt;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="/"/&gt; &lt;/providers&gt; &lt;/membership&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload