wcf - how to create nettcpbinding of this custombinding -
I'm new to the WCF programming model and I want to use netTcpBinding
. Before I ask my question below, this is my custom binding:
& lt; Custombunding & gt; & Lt; Binding name = "original" & gt; & Lt; Security AuthenticationMode = "UserName Forms Certificate" / & gt; & Lt; BinaryMessageEncoding / & gt; & Lt; HttpsTransport / & gt; & Lt; / Binding & gt; & Lt; / CustomBinding & gt;
When I create a service reference using a simple console application, then it gets the certificate and I am asked to use it and in this way I have the webservice I can use ...
But when I change bindings with netTcpBinding
with TransportWithMessageCredential
then the service is in search of certification and can not Find it like this:
& lt; NetTcpBinding & gt; & Lt; Binding name = "sdfsd" & gt; & Lt; Safety Mode = "TransportWithMessageCredential" & gt; & Lt; Message client CredentialType = "UserName" /> & Lt; Transport Customer Credential Type = "None" /> & Lt; / Safety & gt; & Lt; / Binding & gt; & Lt; / NetTcpBinding & gt;
ServiceCertificate.SetCertificate (StoreLocation.LocalMachine, StoreName.My, X509FindType.FindByIssuerName, "Contoso.com").
At this point I use the CustomNameValidator
and I do it programmatically.
So why did not I get a certified certificate for calling SetCertificate
with netTcpBinding
TransportWithMessageCredential
? Am I forgetting something? Or do I have to add something?
OK guys ... sorry, but some message messing ... my custom binding custom Binding is
& lt; Custom binding & gt; & Lt; Binding name = "original" & gt; & Lt; Security AuthenticationMode = "UserName Forms Certificate" / & gt; & Lt; BinaryMessageEncoding / & gt; & Lt; HttpsTransport / & gt; & Lt; / Binding & gt; & Lt; / CustomBinding & gt;
and netTcpBing which I have tried to convert:
& lt; NetTcpBinding & gt; & Lt; Binding name = "sdfsd" & gt; & Lt; Safety Mode = "TransportWithMessageCredential" & gt; & Lt; Message client CredentialType = "UserName" /> & Lt; Transport Customer Credential Type = "None" /> & Lt; / Safety & gt; & Lt; / Binding & gt; & Lt; / NetTcpBinding & gt;
Comments
Post a Comment