UserManager<TUser, TKey>.AccessFailedAsync Method (TKey)

 

Increments the access failed count for the user and if the failed access account is greater than or equal to the MaxFailedAccessAttempsBeforeLockout, the user will be locked out for the next DefaultAccountLockoutTimeSpan and the AccessFailedCount will be reset to 0. This is used for locking out the user account.

Namespace:   Microsoft.AspNet.Identity
Assembly:  Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)

Syntax

public virtual Task<IdentityResult> AccessFailedAsync(
    TKey userId
)
public:
virtual Task<IdentityResult^>^ AccessFailedAsync(
    TKey userId
)
abstract AccessFailedAsync : 
        userId:'TKey -> Task<IdentityResult>
override AccessFailedAsync : 
        userId:'TKey -> Task<IdentityResult>
Public Overridable Function AccessFailedAsync (
    userId As TKey
) As Task(Of IdentityResult)

Parameters

  • userId
    Type: TKey

    The User ID.

Return Value

Type: System.Threading.Tasks.Task<IdentityResult>

The task representing the asynchronous operation.

See Also

UserManager<TUser, TKey> Class
Microsoft.AspNet.Identity Namespace
ASP.NET Identity

Return to top