none
Order of Binding Elements in the Custom Binding RRS feed

  • Question

  • Dear all .NET users

    I find everywhere this kind of pattern, such as the code example I found on this forum

    <customBinding>

    <binding name="msmqSoap11">
      <textMessageEncoding messageVersion="Soap11"/>
      <msmqTransport exactlyOnce ="false" durable="true">
        <msmqTransportSecurity msmqAuthenticationMode ="None" msmqProtectionLevel ="None"/>
      </msmqTransport>
    </binding>
    </customBinding>

    Here in this configuration the textMessageEncoding PRECEDES the msmqTransport.

    For the .NET 4.5  the MSDN also states that the Encoding precedes Transport

    However, the book that I am reading clearly states that the custom binding elements always have to be in that order:

    Transactions

    Reliability

    Security

    Transport

    Encoding

    In that order the Transport precedes Encoding. The book is called Microsoft .NET 3.5 Windows Communication Foundation. Did the order change for 4.0. or is it just a typo? or something else?

    Thank you all very much for your answers

    Thursday, December 19, 2013 3:25 PM

Answers


  • In that order the Transport precedes Encoding. The book is called Microsoft .NET 3.5 Windows Communication Foundation. Did the order change for 4.0. or is it just a typo? or something else?

    Hi,

    Yes, in the WCF 4.0, when we are creating new bindings, the order of the added binding elements is important. Always add binding elements in the following order:


    For more information, please try to refer to:
    #Custom Binding:
    http://msdn.microsoft.com/en-us/library/ms733893(v=vs.100).aspx .

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, December 20, 2013 8:29 AM
    Moderator