WebSecurity.IsAccountLockedOut Method (String, Int32, TimeSpan)
Returns a value that indicates whether the specified membership account is temporarily locked because of too many failed password attempts in the specified time span.
Assembly: WebMatrix.WebData (in WebMatrix.WebData.dll)
'Declaration Public Shared Function IsAccountLockedOut ( _ userName As String, _ allowedPasswordAttempts As Integer, _ interval As TimeSpan _ ) As Boolean 'Usage Dim userName As String Dim allowedPasswordAttempts As Integer Dim interval As TimeSpan Dim returnValue As Boolean returnValue = WebSecurity.IsAccountLockedOut(userName, _ allowedPasswordAttempts, interval)
- Type: System.String
The user name of the membership account.
- Type: System.Int32
The number of password attempts the user is permitted before the membership account is locked.
- Type: System.TimeSpan
The number of seconds to lock out a user account after the number of password attempts exceeds the value in the allowedPasswordAttempts parameter.
Return ValueType: System.Boolean
true if the membership account is locked; otherwise, false.
The SimpleMembershipProvider.Initialize(String, NameValueCollection) method was not called.
The InitializeDatabaseConnection method was not called.
The SimpleMembershipProvider membership provider is not registered in the configuration of your site. For more information, contact your site's system administrator.