SimpleMembershipProvider.ResetPassword(String, String) Method

Definition

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

answer does not match the security answer for the user account in the membership table and RequiresQuestionAndAnswer is true.

Applies to