none
MaxClockSkew and netTcpBinding binding RRS feed

  • Question

  • I am a WCF beginner and I am trying to figure out how to set the MaxClockSkew for the tcpTransport.  I found this old thread (https://social.msdn.microsoft.com/Forums/en-US/3e246fff-3ad3-4080-a1a6-927245f1c94f/maxclockskew-on-nettcpbinding?forum=wcf) and tried what it suggested but I get this error:

    Binding 'CustomBinding' doesn't support creating any channel types. This often indicates that the BindingElements in a CustomBinding have been stacked incorrectly or in the wrong order. A Transport is required at the bottom of the stack. The recommended order for BindingElements is: TransactionFlow, ReliableSession, Security, CompositeDuplex, OneWay, StreamSecurity, MessageEncoding, Transport. 

    My custom binding is:

    <binding name="ClockSkewTcpBinding">
    <transactionFlow/>
    <reliableSession/>
    <security>
    <localClientSettings maxClockSkew="00:30:00"/>
    <localServiceSettings maxClockSkew="00:30:00"/>
    <secureConversationBootstrap>
    <localClientSettings maxClockSkew="00:30:00"/>
    <localServiceSettings maxClockSkew="00:30:00"/>
    </secureConversationBootstrap>
    </security>
    <binaryMessageEncoding/>
    <tcpTransport/>
    </binding>

    What I have defined is similar to a Microsoft article (http://msdn.microsoft.com/en-us/library/aa738468.aspx).  Does anyone have any ideas what I am doing wrong?

    Tuesday, October 21, 2014 10:10 PM

All replies

  • Have you tried the following code:
    <bindings>
      <customBinding>
        <binding name="MaxClockSkewBinding">
            <textMessageEncoding />
            <security authenticationMode="Kerberos">
               <localClientSettings maxClockSkew="00:07:00" />
               <localServiceSettings maxClockSkew="00:07:00" />
               <secureConversationBootstrap>
                  <localClientSettings maxClockSkew="00:30:00" />
                  <localServiceSettings maxClockSkew="00:30:00" />
               </secureConversationBootstrap>
            </security>
            <httpTransport />
        </binding>
      </customBinding>
    </bindings>
    

    Wednesday, October 22, 2014 6:03 AM