MembershipUser.IsLockedOut 属性

定义

获取一个值,该值指示成员资格用户是否因被锁定而无法进行验证。Gets a value indicating whether the membership user is locked out and unable to be validated.

public:
 virtual property bool IsLockedOut { bool get(); };
public virtual bool IsLockedOut { get; }
member this.IsLockedOut : bool
Public Overridable ReadOnly Property IsLockedOut As Boolean

属性值

如果成员资格用户因被锁定而无法进行验证,则为 true;否则为 falsetrue if the membership user is locked out and unable to be validated; otherwise, false.

注解

当在中ValidateUser 到达PasswordAttemptWindow时,用户通常被锁定,并且不能通过方法MaxInvalidPasswordAttempts进行验证。Users are most commonly locked out and cannot be validated by the ValidateUser method when the MaxInvalidPasswordAttempts is reached within the PasswordAttemptWindow.

如果你使用GetPassword接受密码答案的或ResetPassword重载,并且Membership.PasswordAttemptWindow用户输入的错误答案的数目达到中的, Membership.MaxInvalidPasswordAttempts则也可以锁定用户。Users can also be locked out if you use the GetPassword or ResetPassword overload that accepts a password answer and the number of bad answers entered by the user reaches the Membership.MaxInvalidPasswordAttempts within the Membership.PasswordAttemptWindow.

若要将此属性false设置为,并让用户再次尝试登录,可以UnlockUser使用方法。To set this property to false and let the user try to log in again, you can use the UnlockUser method.

适用于

另请参阅