Creating a custom binding in WCF from an existing nettcpbinding

Can anyone tell me how to create a custom binding that reproduces the same behavior from the following in WCF?

<netTcpBinding>
        <binding name="SecureTcp" >
          <security mode="TransportWithMessageCredential">
            <transport clientCredentialType="Certificate" />
            <message clientCredentialType="UserName" />
          </security>
        </binding>
      </netTcpBinding>

      

All googled solutions I found don't seem to work for one reason or another. I have found many solutions regarding httpTransport, but very few regarding nettcptransport.

The above configuration is currently working, but I need to change the maxClockSkew and the only way to accomplish this is with a custom binding.

Thanks in advance, Brian

+2


source to share


1 answer


Well, here's what I was able to come up with. They were the authenticationMode key in the secureConversationBoostrap section:

<binding name="CustomSecureTcp">
    <transactionFlow  />
    <security authenticationMode="SecureConversation"requireSecurityContextCancellation="true">
      <secureConversationBootstrap
        authenticationMode="UserNameOverTransport">
      </secureConversationBootstrap>
    </security>
    <binaryMessageEncoding/>
    <sslStreamSecurity requireClientCertificate="false" />
    <tcpTransport/>
  </binding>
 </customBinding>

      



EDIT: I'm pretty sure "transactionProtocol =" OleTransactions "'is not required

+2


source







All Articles