WSHttpBindingBase.MessageEncoding Property


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

 property System::ServiceModel::WSMessageEncoding MessageEncoding { System::ServiceModel::WSMessageEncoding get(); void set(System::ServiceModel::WSMessageEncoding value); };
public System.ServiceModel.WSMessageEncoding MessageEncoding { get; set; }
member this.MessageEncoding : System.ServiceModel.WSMessageEncoding with get, set
Public Property MessageEncoding As WSMessageEncoding

Property Value

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


This example shows how to get the maximum size for a message

WSMessageEncoding messageEncoding =
Dim messageEncoding As WSMessageEncoding = binding1.MessageEncoding

Applies to