简体   繁体   中英

Prevent IsLockedOut for FailedPasswordAttemptCount

I have searched for the answer only to find answers about how to unlock a user that is locked in AspNetDb.

Is there a setting I can make in the web.config or anywhere else that will prevent an account from getting locked out after "x" number of FailedPasswordAttemptCount 's?

As I know there is no setting which prevent an account to be locked if the user exceed MaxInvalidPasswordAttempts during PasswordAttemptWindow period.

SqlMembershipProvider defaults MaxInvalidPasswordAttempts to 5 and PasswordAttemptWindow to 10 minutes.

But you can set MaxInvalidPasswordAttempts to Int32.MaxValue and it will prevent user account to be locked.

<membership defaultProvider="SqlMembershipProvider">
  <providers>
    <add name="SqlMembershipProvider" 
    ... 
    maxInvalidPasswordAttempts="2147483647"/>
  </providers>
</membership>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM