私は WCF プログラミング モデルが初めてで、使用したいと考えていますnetTcpBinding
。以下で質問する前に、これが私のカスタム バインディングです。
<customBinding>
<binding name="basic">
<security authenticationMode="UserNameForCertificate"/>
<binaryMessageEncoding/>
<httpsTransport/>
</binding>
</customBinding>
シンプルなコンソール アプリケーションを使用してサービス参照を作成すると、証明書が見つかり、それを使用するように求められます。そして、このようにして私はウェブサービスを使うことができます...
しかし、サービスnetTcpBinding
とのバインディングを変更するとTransportWithMessageCredential
、証明書を探していて、次のように見つけることができませんでした:
<netTcpBinding>
<binding name ="sdfsd">
<security mode="TransportWithMessageCredential">
<message clientCredentialType="UserName"/>
<transport clientCredentialType="None"/>
</security>
</binding>
</netTcpBinding>
ServiceCertificate.SetCertificate(StoreLocation.LocalMachine, StoreName.My, X509FindType.FindByIssuerName, "Contoso.com").
この時点で、私は a を使用し、CustomNameValidator
プログラムで実行します。
で使用するnetTcpBinding
と、インストールされた証明書が見つからないTransportWithMessageCredential
のはなぜですか? SetCertificate
何か不足していますか?または、何かを追加する必要がありますか?