MessageHeader Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents the content of a SOAP header.
public ref class MessageHeader abstract : System::ServiceModel::Channels::MessageHeaderInfo
public abstract class MessageHeader : System.ServiceModel.Channels.MessageHeaderInfo
type MessageHeader = class
inherit MessageHeaderInfo
Public MustInherit Class MessageHeader
Inherits MessageHeaderInfo
- Inheritance
A message header contains optional metadata that describe a message encapsulated by the Message class.
A Message can have zero or more headers that are used as an extension mechanism to pass information in messages that are application-specific. You can use Headers to add message headers to a message by calling the Add method.
Windows Communication Foundation (WCF) provides a number of predefined message headers, as shown in the following table.
Header Name | Description |
---|---|
To | Contains the role that the message is targeting. |
Action | Provides a description of how the message should be processed. |
FaultTo | Contains the address of the node to which faults should be sent. |
From | Contains the address of the node that sent the message. |
Request | Indicates whether the message is a request. |
MessageID | Contains the unique ID of the message. |
RelatesTo | Contains the IDs of messages that are related to this message. |
ReplyTo | Contains the address of the node to which a reply should be sent for a request. |
Message |
Initializes a new instance of the MessageHeader class. |
Actor |
Gets or sets the targeted recipient of the message header. |
Is |
Gets a value that specifies whether this message header contains reference parameters of an endpoint reference. |
Must |
Gets or sets a value that indicates whether the header must be understood, according to SOAP 1.1/1.2 specification. |
Name |
Gets the name of the message header. (Inherited from MessageHeaderInfo) |
Namespace |
Gets the namespace of the message header. (Inherited from MessageHeaderInfo) |
Relay |
Gets a value that indicates whether the header should be relayed. |
Create |
Creates a new message header with the specified data. |
Create |
Creates a new message header with the specified data. |
Create |
Creates a new message header with the specified data. |
Create |
Creates a new message header with the specified data. |
Create |
Creates a new message header with the specified data. |
Create |
Creates a new message header with the specified data. |
Create |
Creates a header from an object to be serialized using the XmlFormatter. |
Create |
Creates a new message header with the specified data. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
Get |
Serves as the default hash function. (Inherited from Object) |
Get |
Gets the Type of the current instance. (Inherited from Object) |
Is |
Verifies whether the specified message version is supported. |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
On |
Called when the header content is serialized using the specified XML writer. |
On |
Called when the start header is serialized using the specified XML writer. |
To |
Returns the string representation of this message header. |
Write |
Serializes the header using the specified XML writer. |
Write |
Serializes the header using the specified XML writer. |
Write |
Serializes the header attributes using the specified XML writer. |
Write |
Serializes the header contents using the specified XML writer. |
Write |
Serializes the start header using the specified XML writer. |
Product | Versions |
---|---|
.NET | Core 1.0, Core 1.1, 8 (package-provided) |
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
UWP | 10.0 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: