Unlock user account RRS feed

  • Question

  • User-305496339 posted

    Hi Friends,

    If a use has been locked out of their account, how do I unlock it.

    Tuesday, January 21, 2020 4:18 PM


  • User281315223 posted

    This usually will depend on what type of identity / authentication / authorization mechanisms your application is using. For something like the older ASP.NET Membership, you would just get your user and explicitly unlock them via the UnlockUser() method:

    var user = Membership.GetUser(userName);

    Likewise, you could open up SQL Server and access your Membership database and update the FailedLoginPasswordAttemptCount to 0 and set IsLockedOut to 0. If you are using a different provider, then these will obviously be different.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, January 21, 2020 4:27 PM