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
找不到安裝的證書?我錯過了什麼嗎?或者我必須添加一些東西?