0
私は、WCFサービスに接続するときSystem.ServiceModel.EndpointAddress
を作成するには、次の機能を使用しています:プログラムで設定アイデンティティ
private static EndpointAddress GetEndPointAddress(string url, EndpointIdentity identity)
{
Uri baseAddress = new Uri(url);
EndpointAddress endpointAddress = new EndpointAddress(
baseAddress,
identity,
new AddressHeaderCollection());
return endpointAddress;
}
私は私のウェブからの抜粋と相関EndPointIdentity
に渡す必要があります。設定:
<identity>
<dns value="Some Value" />
</identity>
私のWCFサービスは、X509証明書を使用していますので、私のアイデンティティがタイプX509CertificateEndpointIdentity
であることが必要であると思われます。このためのコンストラクタでは、証明書を渡す必要がありますが、上記のように、DNS値を渡したいと思います。
私のアプローチで何が間違っているとお考えですか?実際に