MustUnderstandBehavior Class


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Instructs Windows Communication Foundation (WCF) to disable the mandatory processing of headers not in the UnderstoodHeaders collection that must be understood according to the SOAP 1.1 and 1.2 specifications.

Namespace:   System.ServiceModel.Description
Assembly:  System.ServiceModel (in System.ServiceModel.dll)


public class MustUnderstandBehavior : IEndpointBehavior


Initializes a new instance of the MustUnderstandBehavior class using the specified value.


Gets or sets a value that specifies whether to ensure that a header is understood according to the SOAP 1.1 and 1.2 specifications.


Determines whether the specified object is equal to the current object.(Inherited from Object.)


Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)


Serves as the default hash function. (Inherited from Object.)


Gets the Type of the current instance.(Inherited from Object.)


Creates a shallow copy of the current Object.(Inherited from Object.)


Returns a string that represents the current object.(Inherited from Object.)

By default the WCF client or service runtime throws an exception when it encounters a System.ServiceModel.Channels.MessageHeader in a message for which the MessageHeader.MustUnderstand property is true but the header is not in the MessageHeaders.UnderstoodHeaders property for the message.

To prevent this behavior, use the MustUnderstandBehavior and set the ValidateMustUnderstand property to false. Typically, this is used in scenarios where the message content is meant to be relayed somewhere else and not processed, such as a router service.

.NET Framework
Available since 3.0

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top