この問題に関するいくつかの質問がありました。ここで証明書の問題x.509 c#
は私の状況です:
FIRST:
私はこのような何かApp.configファイルに書くとき: 「リモート証明書を:私はその種類の通信見たより
<behaviors>
<endpointBehaviors>
<behavior name="CustomBehavior">
<clientCredentials>
<clientCertificate findValue="1234*********"
x509FindType="FindByThumbprint"
storeLocation="LocalMachine" storeName="Root" />
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>
を検証手続きによって無効です。 "
SECOND:
<behaviors>
<endpointBehaviors>
<behavior name="CustomBehavior">
<clientCredentials>
<clientCertificate findValue="test"
x509FindType="FindBySubjectName"
storeLocation="LocalMachine" storeName="Root" />
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>
私は一種の通信ことがわかりたより: それはその名前で多くの証明書です。
mmcでローカルコンピュータに証明書をインストールしましたが、この証明書は信頼できる公開ルートにあります。また、私はIEがこの証明書を持っているかどうかをチェックし、また持っています。
私は、親指プリント、サブジェクト名、発行者名、シリアル番号、サブジェクトキー識別子などで自分の証明書を検索しようとしました。
UPDATE:私はあなたが追加する必要があるすべては解決策を見つけ :!
BasicHttpBinding basicHttpBinding =新しいBasicHttpBinding();
basicHttpBinding.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly;
basicHttpBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Windows;
EndpointAddress endpoint = new EndpointAddress("http://testasp.asmx");
RemoteSetup.RemoteSetupServiceSoapClient client = new RemoteSetup.RemoteSetupServiceSoapClient(basicHttpBinding, endpoint);
client.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;
client.ChannelFactory.Credentials.Windows.ClientCredential = System.Net.CredentialCache.DefaultNetworkCredentials;
あなたのコードを適切にフォーマットしてください。 –