BasicHttpBinding::MessageEncoding Property

 
System_CAPS_noteNote

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

Gets or sets whether MTOM or Text is used to encode SOAP messages.

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

public:
property WSMessageEncoding MessageEncoding {
	WSMessageEncoding get();
	void set(WSMessageEncoding value);
}

Property Value

Type: System.ServiceModel::WSMessageEncoding

The value of WSMessageEncoding that indicates whether MTOM or Text/XML is used to encode SOAP messages. The default value is Text.

The following example sets MessageEncoding to Text.


BasicHttpBinding binding = new BasicHttpBinding();
// Use double the default value
binding.MessageEncoding = WSMessageEncoding.Text;

The value of this property can also be set in the configuration file.

.NET Framework
Available since 3.0
Return to top
Show: