Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to unlock an ASPNETDB user account after bad password count lockout?

i'm new and using the login control with the ASPNETDB visual studio generated user database

i set a maximum bad password count of 5 in web.config and tested to the point that an account was locked out. i am however unable to figure out how to unlock the account now.

this problem is on my remotely hosted site, so this isn't something i can do with the visual studio asp.net configuration tool

some c# code i could run in the .cs page_load, that would let me input the username and have it unlocked would be great. then i could make a form to do it later when i need to easily.

thanks in advance for any help.

like image 393
korben Avatar asked Jun 20 '10 23:06

korben


1 Answers

  MembershipUser usr = Membership.GetUser(userName);
  usr.UnlockUser();
like image 111
Brian Avatar answered Nov 10 '22 03:11

Brian