This documentation is archived and is not being maintained.
UserNameSecurityToken Constructor (String, String)
Visual Studio 2010
Initializes a new instance of the UserNameSecurityToken class using the specified user name and password.
Assembly: System.IdentityModel (in System.IdentityModel.dll)
Parameters
- userName
- Type: System::String
A user name. Sets the UserName property.
- password
- Type: System::String
A password for the user name. Sets the Password property.
| Exception | Condition |
|---|---|
| ArgumentNullException | userName is nullptr. -or- password is nullptr. |
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: