HttpRuntimeSection.RequestLengthDiskThreshold Property
.NET Framework 4
Gets or sets the input-stream buffering threshold.
Assembly: System.Web (in System.Web.dll)
[ConfigurationPropertyAttribute("requestLengthDiskThreshold", DefaultValue = )] [IntegerValidatorAttribute(MinValue = )] public int RequestLengthDiskThreshold { get; set; }
Property Value
Type: System.Int32The number of bytes that indicate the input-stream buffering threshold. The default is 80 kilobytes.
| Exception | Condition |
|---|---|
| ConfigurationErrorsException |
The selected value is greater than MaxRequestLength. |
The RequestLengthDiskThreshold property specifies the input-stream buffering threshold limit in number of bytes. Its value should not exceed the MaxRequestLength property value. After a request entity exceeds this threshold, it is buffered transparently onto disk.
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.
Regarding above comments
@TxITGuy: I'd think KB would be more reasonable value here, as when I'm writing at 1KB buffer (i.e.: writing 1KB of data in each write), I found it slow, but when using 64KB buffer, the performance becomes acceptable. If you're writing web server, you'll want to process memory hogging requests as fast as it should be. However, it seems documentation for v2 and 3 is consistant on agreeing it 256 bytes.
@Martin: It seems that the 80KB default value is for .NET v3.5 and 4. If you change the dropdown of that page to target .NET v2 or 3.0, it shows 256 bytes there. So it's documentation change not propagated to other relevent places.
@Martin: It seems that the 80KB default value is for .NET v3.5 and 4. If you change the dropdown of that page to target .NET v2 or 3.0, it shows 256 bytes there. So it's documentation change not propagated to other relevent places.
- 10/15/2011
- cheong00
Also conflicts with HttpPostedFile documentation
It gets even more confusing, as this page says the default is 256K, rather than 256 bytes:
http://msdn.microsoft.com/en-us/library/system.web.httppostedfile.aspx
Perhaps the value means different things to different classes?
http://msdn.microsoft.com/en-us/library/system.web.httppostedfile.aspx
Perhaps the value means different things to different classes?
- 8/10/2011
- TxITGuy
Inconsistent information
According to this page:
The number of bytes that indicate the input-stream buffering threshold. The default is 256 bytes.
According to http://msdn.microsoft.com/en-us/library/e1f13641.aspx:
Specifies the limit for the input stream buffering threshold, in kilobytes. The default is 80 KB.
Which one is true?
The number of bytes that indicate the input-stream buffering threshold. The default is 256 bytes.
According to http://msdn.microsoft.com/en-us/library/e1f13641.aspx:
Specifies the limit for the input stream buffering threshold, in kilobytes. The default is 80 KB.
Which one is true?
- 10/28/2010
- Martin Ording-Thomsen
