2012-01-13 6 views
6

が提供されていません。 LocalComputer \ Personal証明書に格納されている2つの証明書(サーバー側とクライアント側)を生成しました。私の構成は次のとおりです。例外:クライアント証明書は、私は安心してWCFサービスを設定しようとしています

サーバー:

<netTcpBinding> 
    <binding name="defaultBinding"> 
     <security mode="Transport"> 
     <transport clientCredentialType="Certificate"/> 
     </security> 
    </binding> 
</netTcpBinding> 

<service name="..." behaviorConfiguration="serviceBehavior"> 
    <endpoint address="..." binding="netTcpBinding" bindingConfiguration="defaultBinding" contract="..."> 
     <identity> 
     <dns value="ClientSide"/> 
     </identity> 
    </endpoint> 
</service> 

<behavior name="serviceBehavior"> 
    <serviceCredentials> 
     <serviceCertificate storeLocation="LocalMachine" storeName="My" findValue="ServerSide" x509FindType="FindBySubjectName"/> 
     <clientCertificate> 
      <authentication certificateValidationMode="None" revocationMode="NoCheck"/> 
     </clientCertificate> 
    </serviceCredentials> 
<behavior> 

はクライアント:

<netTcpBinding> 
    <binding name="defaultBinding"> 
     <security mode="Transport"> 
     <transport clientCredentialType="Certificate"/> 
     </security> 
    </binding> 
</netTcpBinding> 

<endpoint name="..." binding="netTcpBinding" bindingConfiguration="defaultBinding" contract="..." 
      behaviorConfiguration="endpointBehavior"> 
    <identity> 
    <dns value="ServerSide"/> 
    </identity> 
</endpoint> 

<behavior name="endpointBehavior"> 
    <clientCredentials> 
     <serviceCertificate> 
      <authentication certificateValidationMode="None" revocationMode="NoCheck"/> 
     </serviceCertificate> 
     <clientCertificate storeLocation="LocalMachine" storeName="My" findValue="ClientSide" x509FindType="FindBySubjectName"/> 
    </clientCredentials> 
<behavior> 

私は例外を取得しています:クライアント証明書が提供されていません。私は多くのチュートリアルを試してみました

ClientCredentialsでクライアント証明書を指定し、それらのどれも機能しません。なにか提案を?

答えて

6

答えは例外に実際にあります。 クライアント証明書がありません。あなたはこの

<clientCredentials> 
     <serviceCertificate> 
      <authentication certificateValidationMode="None" revocationMode="NoCheck"/> 
     </serviceCertificate> 
     <clientCertificate storeLocation="LocalMachine" storeName="My" findValue="ClientSide" x509FindType="FindBySubjectName"/> 
    </clientCredentials> 

でクライアント証明書のためのサービス証明書を定義しますが、クライアント

​​

のためのクライアント証明書を定義しているもの、あなたが実際に行っている必要がありますこれは、少なくともあなたのThe client certificate is not provided. Specify a client certificate in ClientCredentials例外を解決する必要があります。

関連する問題