how to create nettcpbinding of this custombinding

Posted by evgeni on Stack Overflow See other posts from Stack Overflow or by evgeni
Published on 2010-06-14T20:56:12Z Indexed on 2010/06/14 21:02 UTC
Read the original article Hit count: 329

Filed under:
|

I am new at wcf programming model and i want to use nettcpbinding. before i ask my question below is my custom binding :

<customBinding>
    <binding name="basic">
      <security authenticationMode="UserNameForCertificate"/>
      <binaryMessageEncoding/>
      <httpsTransport/>
    </binding>
  </customBinding>

when i create a service reference using a simple console application it finds a certificate and ask me to use it.and this way i can use the webservice ... but when i change binding to nettcpbinding with TransportWithMessageCredential the service is looking for certificate and could not find it like this :

    </binding>
  </netTcpBinding>

ServiceCertificate.SetCertificate(StoreLocation.LocalMachine, StoreName.My, X509FindType.FindByIssuerName, "Contoso.com"). at this point i use a customnamevalidator and i do it programmatically. so why when i use nettcpbinding with TransportWithMessageCredential why is SetCertificate could not find the installed certificate ? am i missed something ? or do i have to ad something? thanks .

© Stack Overflow or respective owner

Related posts about wcf

Related posts about nettcpbinding