System.Web.Security.ActiveDirectoryMembershipProvider.UnlockUser Method

Clears a lock so that a membership user can be validated.

Syntax

public override bool UnlockUser (string userName)

Parameters

userName
Documentation for this section has not yet been entered.

Returns

true if the membership user was successfully unlocked; otherwise, false. The ActiveDirectoryMembershipProvider.UnlockUser(string) method also returns false when the membership user is not found in the data store.

Remarks

Users are most commonly locked out and cannot be validated by the ActiveDirectoryMembershipProvider.ValidateUser(string, string) method when the ActiveDirectoryMembershipProvider.MaxInvalidPasswordAttempts property is exceeded within the time specified in the ActiveDirectoryMembershipProvider.PasswordAttemptWindow property or when too many attempts have been made to log on using the wrong password.

If the ActiveDirectoryMembershipProvider.EnablePasswordReset property is true, when a user is unlocked the counters for bad passwords are reset.

The provider uses a subtree search starting at the search point specified in the connection string. See the System.Web.Security.ActiveDirectoryMembershipProvider class topic for more information about connection strings.

Leading and trailing spaces are trimmed from the username parameter value.

Requirements

Namespace: System.Web.Security
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0