MembershipUser.IsLockedOut 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得值,指出成員資格使用者是否已鎖定且無法驗證。
public:
virtual property bool IsLockedOut { bool get(); };
public virtual bool IsLockedOut { get; }
member this.IsLockedOut : bool
Public Overridable ReadOnly Property IsLockedOut As Boolean
屬性值
true若會員用戶被鎖定且無法驗證;否則,。 false
備註
使用者最常被鎖定,且當 在 中被存取ValidateUser時,無法被MaxInvalidPasswordAttempts該方法PasswordAttemptWindow驗證。
如果你使用 GetPassword 接受密碼答案的 或 ResetPassword 過載,且輸入錯誤答案的數量達到 Membership.MaxInvalidPasswordAttemptsMembership.PasswordAttemptWindow。
要將此屬性設定為 並 false 讓使用者重新嘗試登入,可以使用這個 UnlockUser 方法。