HttpRuntimeSection.MaxRequestLength Property
.NET Framework 4
Gets or sets the maximum request size.
Assembly: System.Web (in System.Web.dll)
| Exception | Condition |
|---|---|
| ConfigurationErrorsException |
The selected value is less than RequestLengthDiskThreshold. |
The MaxRequestLength property specifies the limit for the buffering threshold of the input stream. For example, this limit can be used to prevent denial of service attacks that are caused by users who post large files to the server.
The value assigned to this property should be greater or equal to value assigned to the RequestLengthDiskThreshold property.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Page-level setting
I want to allow huge request lengths only for a single page (upload), so that the rest of the site stays better protected from dos attacks.
- 4/19/2012
- Robert te Kaat - IS