Resets a user's password to a new, automatically generated password.

Namespace:  Novalys.VisualGuard.Security.WebForm
Assembly:  Novalys.VisualGuard.Security.WebForm (in Novalys.VisualGuard.Security.WebForm.dll) Version: 3.2.912.1 (3.2.912.01)

Syntax

C#
public override string ResetPassword(
	string username,
	string passwordAnswer
)
Visual Basic (Declaration)
Public Overrides Function ResetPassword ( _
	username As String, _
	passwordAnswer As String _
) As String

Parameters

username
Type: System..::.String
the user to reset the password for.
passwordAnswer
Type: System..::.String
The password answer for the specified user.

Return Value

The new password for the specified user.

Exceptions

ExceptionCondition
System..::.ArgumentNullExceptionusername is null.

or

If RequiresQuestionAndAnswer is set to true and the passwordAnswer is empty.
System..::.ArgumentExceptionusername or passwordAnswer is longer than 64 characters.
System..::.NotSupportedExceptionIf EnablePasswordReset is not set to true.
System.Web.Security..::.MembershipPasswordExceptionpasswordAnswer is invalid or user account is locked out.

See Also