Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
how to set new password bye entering security question and answer
Posted
Comments
Uday P.Singh 3-May-12 0:31am    
not clear please elaborate your question?
Prasad_Kulkarni 6-May-12 3:48am    
Glad it helps!
Thank you for accepting solution.

1 solution

Membership.GetUser().PasswordQuestion contains the Security Question.

Membership.GetUser().ResetPassword(securityQuestionAnswer) will generate a new random password for the user. You can then email this to the user.

http://msdn.microsoft.com/en-us/library/d90zte4w.aspx[^]

If a password answer is required and an incorrect password answer is supplied, a MembershipPasswordException is thrown by the membership provider. If you wanted to allow the user to enter a password, you could check to ensure that this exception is not thrown, then change the password.

For more have a look on following thread:
Change Password Function![^]
 
Share this answer
 
Comments
sangel1989 9-May-12 7:43am    
my 5!
Prasad_Kulkarni 17-May-12 7:10am    
Thank you sangel

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900