Visual Guard Class Library Documentation

VGSecurityManager.ChangePasswordQuestionAndAnswer Method 

Changes the password question and answer of the user.

public static VGPasswordQuestionAndAnswerModificationState ChangePasswordQuestionAndAnswer(
   String name,
   String password,
   String newQuestion,
   String newAnswer
);

Parameters

name
the name of the user.
password
the password of the given user.
newQuestion
The new password question of the user as string.
newAnswer
The new answer of the given password question as string.

Return Value

A VGPasswordQuestionAndAnswerModificationState representing the status of the modification.

Remarks

Visual Guard is case sensitive when it checks the password answer. We strongly recommend to store the password answer as a lowered string and to provide a lowered value of the password answer when you want to reset the password by using the password question and answer.

VGSecurityManager.ChangePasswordQuestionAndAnswer(myPassword.Text, newPasswordQuestion.Text, newPasswordAnswer.Text.ToLowerInvariant())

VGSecurityManager.ResetPassword(myPasswordAnswer.Text.ToLowerInvariant())

Exceptions

Exception TypeCondition
ArgumentNullException

The old password, the new password or the password confirmation are null.

The name is null or empty.

ArgumentException

The name, password, new password answer is longer than 64 characters

The new password question is longer than 256 characters

VGConfigurationExceptionThe configuration file is not valid

or

A problem occurs during the connection to the repository.

or

The version of the repository or the version of the permissions is not supported by the application.

See Also

VGSecurityManager Class | Novalys.VisualGuard.Security Namespace