<maxRequestLength> Element

Specifies the maximum size for incoming SOAP messages.

<microsoft.web.services2> Element
  <messaging> Element

<maxRequestLength>1024</maxRequestLength>

Attributes and Elements

Attributes

None.

Child Elements

None.

Parent Elements

Element Description

<messaging> Element

Controls the messaging settings for the Microsoft Web Services Enhancements.

Text Value

A text value is required. The text 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.is the URL for the security token service.

Remarks

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

Before adding the <maxRequestLength> element to a configuration file, you must add the microsoft.web.services2 configuration section handler to the configuration file. For details about adding the microsoft.web.services2 configuration section handler, see <section> Element (WSE for Microsoft .NET).

Example

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

<configuration>
  <microsoft.web.services2>
    <messaging>
      <maxRequestLength>1024</maxRequestLength>
    </messaging>
  </microsoft.web.services2>
</configuration>

See Also

Reference

<messaging> Element