System.Web.Security.ValidatePasswordEventArgs Class

Provides event data for the MembershipProvider.ValidatingPassword event of the System.Web.Security.MembershipProvider class.

See Also: ValidatePasswordEventArgs Members

Syntax

public sealed class ValidatePasswordEventArgs : EventArgs

Remarks

The MembershipProvider.ValidatingPassword event is raised when the MembershipProvider.CreateUser(string, string, string, string, string, bool, object, MembershipCreateStatus@), MembershipProvider.ChangePassword(string, string, string), or MembershipProvider.ResetPassword(string, string) method of a membership provider is called.

You can handle the MembershipProvider.ValidatingPassword event to validate password formats and values for membership users.

You can cancel the current MembershipProvider.CreateUser(string, string, string, string, string, bool, object, MembershipCreateStatus@), MembershipProvider.ChangePassword(string, string, string), or MembershipProvider.ResetPassword(string, string) action by setting the ValidatePasswordEventArgs.Cancel property to true during the MembershipProvider.ValidatingPassword event.

If you cancel the current action by setting the ValidatePasswordEventArgs.Cancel property to true, you can set the ValidatePasswordEventArgs.FailureInformation property to an exception that describes the reason for the password-validation failure. The calling method will throw the exception that the ValidatePasswordEventArgs.FailureInformation property is set to. If the ValidatePasswordEventArgs.FailureInformation property is null, the caller will throw a generic password-validation failure exception.

Requirements

Namespace: System.Web.Security
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0