SoapMessage::ContentType Property
.NET Framework (current version)
Gets or sets the HTTP Content-Type of the SOAP request or SOAP response.
Assembly: System.Web.Services (in System.Web.Services.dll)
Property Value
Type: System::String^The HTTP Content-Type of the SOAP request or SOAP response. The default is "text/xml".
| Exception | Condition |
|---|---|
| InvalidOperationException | ContentType is accessed AfterSerialize or AfterDeserialize stages. |
The ContentType property can only be accessed in the BeforeSerialize and BeforeDeserialize stages; otherwise, an InvalidOperationException is thrown.
Use the ContentEncoding property, instead of the ContentType property to provide supplementary information about the encoding of a SOAP message.
.NET Framework
Available since 1.1
Available since 1.1
Show: