Skip to main content
All docs
V24.1
.NET 6.0+
  • The page you are viewing does not exist in the .NET Framework 4.5.2+ platform documentation. This link will take you to the parent topic of the current section.

UserManager.AccessFailed(Object) Method

Increases the counter for failed login attempts by a specified user. If the counter value exceeds the limit, the user account is locked out.

Namespace: DevExpress.ExpressApp.Security

Assembly: DevExpress.ExpressApp.Security.v24.1.dll

NuGet Package: DevExpress.ExpressApp.Security

Declaration

public void AccessFailed(
    object user
)

Parameters

Name Type Description
user Object

An application user object.

Remarks

See the ISecurityUserLockout topic for information on the user lockout (“Brute Force” attack protection) feature in XAF.

The following code snippet demonstrates how to use the AccessFailed method to increase the number of failed login attempts allowed for the specified user:

using DevExpress.ExpressApp.Security;
using Microsoft.Extensions.DependencyInjection;
// ...
// Use Dependency Injection to access the IServiceProvider.
var userManager = serviceProvider.GetRequiredService<UserManager>();
userManager.AccessFailed(applicationUserObject);
See Also