HttpRuntimeSection::MaxRequestLength Property
Gets or sets the maximum request size.
Assembly: System.Web (in System.Web.dll)
[IntegerValidatorAttribute(MinValue = )] [ConfigurationPropertyAttribute(L"maxRequestLength", DefaultValue = )] public: property int MaxRequestLength { int get (); void set (int value); }
Property Value
Type: System::Int32The maximum request size in kilobytes. The default size is 4096 KB (4 MB).
| 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.
| Topic | Location |
|---|---|
| How to: Upload Files with the FileUpload Web Server Control | Building ASP .NET Web Applications |
| How to: Upload Files with the FileUpload Web Server Control | Building ASP .NET Web Applications |
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.