This documentation is archived and is not being maintained.

ClientCredentials.HttpDigest Property

Gets the current HTTP Digest credential.

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

public HttpDigestClientCredential HttpDigest { 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";

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

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.