Forgot your password using ASP.Net Membership Provider?

Is it possible to implement a "forgotten password" using the ASP.Net membership provider?

Any sample link is appreciated.

thanks

+4
source share
2 answers

Use PasswordRecovery or you can call the GetPassword () or ResetPassword () methods in your provider membership.

+4
source

The best solution I've seen so far is to reset as follows:

MemberShipUser user = MemberShip.GetUset("someUserName"); user.ChangePassword(user.ResetPassword(), "new-password-word"); 

This is very convenient, especially if your passwords are hashed.

+4
source

Source: https://habr.com/ru/post/1310842/


All Articles