Windows apps
Collapse the table of content
Expand the table of content
Information
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.

ClientCredentials::HttpDigest Property

 

Gets the current HTTP Digest credential.

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

public:
property HttpDigestClientCredential^ HttpDigest {
	HttpDigestClientCredential^ get();
}

Property Value

Type: System.ServiceModel.Security::HttpDigestClientCredential^

A HttpDigestClientCredential that represents the credential that the client uses to authenticate to the service when the HTTP Digest authentication method is chosen.

You can use the object returned by this property to configure the credential by calling the AllowedImpersonationLevel property.

Similarly, you can specify the network credential to use if it is different from the current thread's token.

The following code shows how to use this property to set the credentials user name and password.

private void Snippet2()
{
    using (CalculatorClient client = new CalculatorClient())
    {
        client.ClientCredentials.HttpDigest.ClientCredential.UserName = "test";
        client.ClientCredentials.HttpDigest.ClientCredential.Password = "password";
    }
}

Universal Windows Platform
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Return to top
Show:
© 2017 Microsoft