SimpleMembershipProvider.ResetPassword(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Resets the password for a user account to a new, automatically generated password.
public override string ResetPassword (string username, string answer);
override this.ResetPassword : string * string -> string
Public Overrides Function ResetPassword (username As String, answer As String) As String
Parameters
- username
- String
The user account to reset the password for.
- answer
- String
The answer to the security question for the new user.
Returns
The new password for the specified user account.
Exceptions
EnablePasswordReset is false.
answer
does not match the security answer for the user account in the membership table and RequiresQuestionAndAnswer is true.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for