ClientCredentials Constructor

 
System_CAPS_noteNote

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

Initializes a new instance of the ClientCredentials class.

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

NameDescription
System_CAPS_pubmethodClientCredentials()

Initializes a new instance of the ClientCredentials class.

System_CAPS_protmethodClientCredentials(ClientCredentials)

This is a copy constructor.

The most common way to use this class is to access its properties from the client object and not to instantiate it directly. The following code shows how to do this.

WSHttpBinding b = new WSHttpBinding();
EndpointAddress ea = new EndpointAddress("http://localhost/Calculator");
CalculatorClient client = new CalculatorClient(b, ea);
IssuedTokenClientCredential itcc = client.ClientCredentials.IssuedToken;

itcc.LocalIssuerAddress = new EndpointAddress("http://fabrikam.com/sts");
Return to top
Show: