Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

UserNamePasswordClientCredential Class


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Represents a client credential based on user name and password.

Namespace:   System.ServiceModel.Security
Assembly:  System.ServiceModel (in System.ServiceModel.dll)


public sealed class UserNamePasswordClientCredential


Gets or sets the password.


Gets or sets the user name.


Determines whether the specified object is equal to the current object.(Inherited from Object.)


Serves as the default hash function. (Inherited from Object.)


Gets the Type of the current instance.(Inherited from Object.)


Returns a string that represents the current object.(Inherited from Object.)

This class enables the user to configure the user name and password for a WCFChannelFactory credential when using user name/password authentication. If the channel factory's binding is not configured to use user name/password-based authentication, the user name and password are not used. If the channel factory's binding is configured to use federated security that requires getting an issued token from a security token service, the user name and password are also presented to the security token service if it requires user name/password authentication.

Universal Windows Platform
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Available since 3.0
Windows Phone Silverlight
Available since 7.0

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
© 2017 Microsoft