Uredi

Deli z drugimi prek


MustUnderstandBehavior Class

Definition

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.

public ref class MustUnderstandBehavior : System::ServiceModel::Description::IEndpointBehavior
public class MustUnderstandBehavior : System.ServiceModel.Description.IEndpointBehavior
type MustUnderstandBehavior = class
    interface IEndpointBehavior
Public Class MustUnderstandBehavior
Implements IEndpointBehavior
Inheritance
MustUnderstandBehavior
Implements

Remarks

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.

Constructors

MustUnderstandBehavior(Boolean)

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

Properties

ValidateMustUnderstand

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.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

IEndpointBehavior.AddBindingParameters(ServiceEndpoint, BindingParameterCollection)

Supports behavior functionality.

IEndpointBehavior.ApplyClientBehavior(ServiceEndpoint, ClientRuntime)

Assigns the value of ValidateMustUnderstand to the ValidateMustUnderstand property.

IEndpointBehavior.ApplyDispatchBehavior(ServiceEndpoint, EndpointDispatcher)

Assigns the value of ValidateMustUnderstand to the ValidateMustUnderstand property.

IEndpointBehavior.Validate(ServiceEndpoint)

Supports behavior functionality.

Applies to