0
我是WCF编程模型的新手,我想使用netTcpBinding
。之前我问我下面这个问题是我的自定义绑定:如何创建此自定义绑定的nettcpbinding
<customBinding>
<binding name="basic">
<security authenticationMode="UserNameForCertificate"/>
<binaryMessageEncoding/>
<httpsTransport/>
</binding>
</customBinding>
当我创建一个使用它找到一个证书一个简单的控制台应用程序的服务引用,并要求我使用它。而这样一来,我可以使用web服务...
但是当我改变结合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").
在这一点上,我使用CustomNameValidator
,我以编程方式。
因此,当我使用netTcpBinding
与TransportWithMessageCredential
,为什么拨打SetCertificate
找不到安装的证书?我错过了什么吗?或者我必须添加一些东西?