Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If the user needs to reset his password, there is a chance their account has been locked out from too many invalid attempts. If this is the case, then the password is being reset successfully, but the user cannot log in until the lockout condition is cleared.</p> <p>Try checking <a href="http://MembershipUser.IsLockedOut">MembershipUser.IsLockedOut</a>:</p> <blockquote> <p>Users are most commonly locked out and cannot be validated by the ValidateUser method when the MaxInvalidPasswordAttempts is reached within the PasswordAttemptWindow.</p> <p>To set this property to false and let the user try to log in again, you can use the UnlockUser method.</p> </blockquote> <p><em>Edit</em></p> <p>Did you also check <a href="http://msdn.microsoft.com/en-us/library/system.web.security.membershipuser.isapproved.aspx">IsApproved</a>? Authentication will fail is this is <code>false</code> for the user.</p> <p>Also, assuming by default membership provider, you mean the SqlMembershipProvider, can you run the following query against your database and make sure everything looks correct?</p> <pre><code>select IsApproved, IsLockedOut, FailedPasswordAttemptCount from aspnet_Membership where ApplicationId = @yourApplicationId and UserId = @userId </code></pre> <p>Try executing the query before attempting to sign in to verify <code>IsApproved</code> and <code>IsLockedOut</code> are ok. Also note the value for <code>FailedPasswordAttemptCount</code>.</p> <p>Try signing in, and then run the query again. If signin fails, has the value for <code>FailedPasswordAttemptCount</code> been incremented?</p> <p>You could also look at <code>PasswordFormat</code> in the aspnet_Membership table and make sure it is the correct value depending on the format you are using (0 for Clear, 1 for Hashed, and 2 for Encrypted).</p>
 

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