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)

public:
static DateTime GetLastPasswordFailureDate(
	String^ userName
)

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.

ExceptionCondition
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.

  • Medium trust for the immediate caller. This member can be used by partially trusted code.
Show: