This documentation is archived and is not being maintained.

WindowsUserNameSecurityTokenAuthenticator.ValidateUserNamePasswordCore Method

Authenticates the specified user name and password and returns the set of authorization policies for UserNameSecurityToken security tokens.

Namespace:  System.IdentityModel.Selectors
Assembly:  System.IdentityModel (in System.IdentityModel.dll)

protected override ReadOnlyCollection<IAuthorizationPolicy> ValidateUserNamePasswordCore(
	string userName,
	string password
)

Parameters

userName
Type: System.String

The user name associated with the security token.

password
Type: System.String

The password associated with the security token.

Return Value

Type: System.Collections.ObjectModel.ReadOnlyCollection<IAuthorizationPolicy>
A ReadOnlyCollection<T> of type IAuthorizationPolicy that contains the set of authorization policies in effect for this application.

ExceptionCondition
ArgumentException

userName contains more than one backslash (\) character.

The userName parameter must be in one of the following formats: domain\username or username. If the userName parameter is in the domain\username format, then there must be only one backslash (\) character separating the user name and domain.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Show: