none
what MustUnderstand = true does ? RRS feed

  • Question

  • [MessageContract]
    public class FileDownloadMessage
    {
    [MessageHeader(MustUnderstand = true)]
    public FileMetaData FileMetaData;
    }

    what MustUnderstand = true does ?

    Monday, December 26, 2016 8:42 PM

Answers

  • Hi Mou_inn,

    MessageHeaderAttribute.MustUnderstand specifies whether the node acting in the Actor role must understand this header. This is mapped to the mustUnderstand SOAP header attribute. If a header with the mustUnderstand SOAP header attribute set to true is received by Windows Communication Foundation (WCF), it must be a part of the message contract (or must be processed by one of the Windows Communication Foundation (WCF) channels); otherwise, it is assumed that the header is not understood and an exception is thrown.

    I suggest refer below link for complete description with a sample demo.

    # What is the purpose of MustUnderstand property in WCF?

    http://stackoverflow.com/questions/28981246/what-is-the-purpose-of-mustunderstand-property-in-wcf

    Best Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Sudip_inn Wednesday, December 28, 2016 9:10 PM
    Tuesday, December 27, 2016 3:11 AM