开发者

Forgot password using ASP.Net membership provider?

开发者 https://www.devze.com 2023-01-01 11:31 出处:网络
Is it possible to implement a \"for开发者_如何学Pythongot password\" using ASP.Net membership provider?

Is it possible to implement a "for开发者_如何学Pythongot password" using ASP.Net membership provider?

Any sample link is appreciated.

Thanks


Use PasswordRecovery control or You can call GetPassword() or ResetPassword() methods on your membership provider.


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

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

This is very handy especially if your passwords are hashed.

0

精彩评论

暂无评论...
验证码 换一张
取 消