<maxMessageLength> Element

Specifies the maximum size for incoming SOAP messages to a Web service or a Web service client.

<microsoft.web.services3> Element
  <messaging> Element

<maxMessageLength value="1024" />

Attributes and Elements

Attributes

Attribute Description

value

Specifies the maximum message size, in kilobytes (KB), supported by WSE. A value of -1 specifies that there is no limit. The default is 4096 KB (4 MB). The maximum value is 2,147,483,647.

Child Elements

None.

Parent Elements

Element Description

<messaging> Element

Controls the messaging settings for the Microsoft Web Services Enhancements.

Remarks

Use the <maxMessageLength> element to prevent denial of service attacks caused by users posting large files to the server.

Before adding the <maxMessageLength> element to a configuration file, you must add the microsoft.web.services3 configuration section handler to the configuration file. For details about adding the microsoft.web.services3 configuration section handler, see <section> Element.

Example

The following code example specifies that messages must be less than 1024 KB (1 MB) in size.

<configuration>
  <microsoft.web.services3>
    <messaging>
      <maxMessageLength value="1024" />
    </messaging>
  </microsoft.web.services3>
</configuration>

See Also

Reference

<messaging> Element