ClientCredentials.HttpDigest プロパティ

定義

現在の HTTP ダイジェスト資格情報を取得します。

public:
 property System::ServiceModel::Security::HttpDigestClientCredential ^ HttpDigest { System::ServiceModel::Security::HttpDigestClientCredential ^ get(); };
public System.ServiceModel.Security.HttpDigestClientCredential HttpDigest { get; }
member this.HttpDigest : System.ServiceModel.Security.HttpDigestClientCredential
Public ReadOnly Property HttpDigest As HttpDigestClientCredential

プロパティ値

HttpDigestClientCredential

HTTP ダイジェスト認証方法が選択されているときに、クライアントがサービスに対して自身を認証するために使用する資格情報を表す HttpDigestClientCredential

このプロパティを使用して資格情報のユーザー名とパスワードを設定する方法を次のコードに示します。

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

注釈

このプロパティによって返されるオブジェクトを使用して AllowedImpersonationLevel プロパティを呼び出すことにより、資格情報を構成できます。

ネットワーク資格情報が現在のスレッドのトークンと異なる場合は、同様にネットワーク資格情報も指定できます。

適用対象