
説明/参照:
Explanation:
ターゲット1:ClientCredentialType
ターゲット2:MessageCredentialType.Certificate
ClientCredentialプロパティを適切な値に設定します。次のコードは、プロパティをCertificateに設定します。
WSHttpBinding b =新しいWSHttpBinding();
b.Security.Mode = SecurityMode.Message;
b.Security.Message.ClientCredentialType = MessageCredentialType.Certificate;ターゲット3:SetCertificateクライアントクラスで、ClientBase <TChannel>クラスのClientCredentialsプロパティを適切な値に設定します。
例://クライアントの証明書を設定します。
cc.ClientCredentials.ClientCertificate.SetCertificate(
StoreLocation.LocalMachine、
StoreName.My、
X509FindType.FindBySubjectName、
"cohowinery.com");
参考文献:https://docs.microsoft.com/en-us/dotnet/framework/wcf/how-to-set-the-security-mode
https://docs.microsoft.com/en-us/dotnet/framework/wcf/how-to-specify-client-credential-values