Export (0) Print
Expand All

BasicHttpBinding.MessageEncoding Property

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

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

public WSMessageEncoding MessageEncoding { get; set; }
/** @property */
public WSMessageEncoding get_MessageEncoding ()

/** @property */
public void set_MessageEncoding (WSMessageEncoding value)

public function get MessageEncoding () : WSMessageEncoding

public function set MessageEncoding (value : WSMessageEncoding)

Not applicable.

Property Value

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.

<configuration>
  <system.serviceModel>

    <bindings>
      <basicHttpBinding>
        <binding name="Binding1"
                 messageEncoding = "Text">
          <security mode="None" />
        </binding>
      </basicHttpBinding>
    </bindings>

  </system.serviceModel>

</configuration>

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft