WebSecurity.GetPasswordFailuresSinceLastSuccess(String) Method

Definition

Returns the number of times that the password for the specified account was incorrectly entered since the last successful login or since the membership account was created.

public static int GetPasswordFailuresSinceLastSuccess (string userName);
static member GetPasswordFailuresSinceLastSuccess : string -> int
Public Shared Function GetPasswordFailuresSinceLastSuccess (userName As String) As Integer

Parameters

userName
String

The user name of the account.

Returns

The count of failed password attempts for the specified account.

Exceptions

The Initialize(String, NameValueCollection) method was not called.-or-The InitializeDatabaseConnection method was not called.-or-The SimpleMembershipProvider membership provider is not registered in the configuration of your site. For more information, contact your site's system administrator.

Applies to