WebSecurity.GetLastPasswordFailureDate Method
Returns the date and time when an incorrect password was most recently entered for the specified account.
Namespace: WebMatrix.WebData
Assembly: WebMatrix.WebData (in WebMatrix.WebData.dll)
Syntax
'Declaration
Public Shared Function GetLastPasswordFailureDate ( _
userName As String _
) As DateTime
'Usage
Dim userName As String
Dim returnValue As DateTime
returnValue = WebSecurity.GetLastPasswordFailureDate(userName)
public static DateTime GetLastPasswordFailureDate(
string userName
)
public:
static DateTime GetLastPasswordFailureDate(
String^ userName
)
static member GetLastPasswordFailureDate :
userName:string -> DateTime
public static function GetLastPasswordFailureDate(
userName : String
) : DateTime
Parameters
- userName
Type: System.String
The user name of the membership account.
Return Value
Type: System.DateTime
The date and time when an incorrect password was most recently entered for this account, or DateTime.MinValue if an incorrect password has not been entered for this account.
Exceptions
Exception | Condition |
---|---|
InvalidOperationException | The SimpleMembershipProvider.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. |