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

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

Syntax

C#
public string ResetPassword()
Visual Basic (Declaration)
Public Function ResetPassword As String

Return Value

The new password for the membership user.

Remarks

If the property "Enable Password Reset" of the repository is not set to true a NotSupportedException will be thrown.

Exceptions

ExceptionCondition
System..::.NotSupportedException

RequiresQuestionAndAnswer is set to true.

or

EnablePasswordReset is not set to true.

System..::.NotSupportedExceptionthe user is not a Visual Guard user and cannot be modified.
Novalys.VisualGuard.Security.Membership..::.VGMembershipPasswordException The user account is currently locked out or does not exist.

- or -

The generated password does not pass the password policy validation.

See Also