MembershipProvider.ValidatingPassword 事件

定义

在创建用户、更改密码或重置密码时发生。Occurs when a user is created, a password is changed, or a password is reset.

public:
 event System::Web::Security::MembershipValidatePasswordEventHandler ^ ValidatingPassword;
public event System.Web.Security.MembershipValidatePasswordEventHandler ValidatingPassword;
member this.ValidatingPassword : System.Web.Security.MembershipValidatePasswordEventHandler 
Public Custom Event ValidatingPassword As MembershipValidatePasswordEventHandler 

示例

有关MembershipProvider实现的示例,请参阅实现配置文件提供程序For an example of a MembershipProvider implementation, see Implementing a Profile Provider.

注解

ValidatingPassword CreateUserResetPassword和方法ChangePassword期间引发事件。The ValidatingPassword event is raised during the CreateUser, ChangePassword, and ResetPassword methods.

ValidatingPassword事件发生在请求的操作之前,并使用户能够继续或取消请求的操作。The ValidatingPassword event occurs before the action requested and enables the user to continue or cancel the requested action. 如果取消该操作,用户可以指定要引发的异常。If the action is canceled, the user can specify an exception to be thrown.

用户使用MembershipValidatePasswordEventHandler事件处理程序来指定ValidatingPassword事件的处理程序。Users use a MembershipValidatePasswordEventHandler event handler to specify a handler for the ValidatingPassword event. 提供程序实现者可以OnValidatingPassword使用虚方法来ValidatingPassword引发事件。Provider implementers can use the OnValidatingPassword virtual method to raise the ValidatingPassword event.

适用于

另请参阅