Is HttpRuntime's requestLengthDiskThreshold in BYTES or KILOBYTES?

420 Views Asked by At

The HttpRuntime's maxRequestLength property is clearly documented as kilobytes, and this matches expected behavior.

However the HttpRuntime's requestLengthDiskThreshold is documented as "BYTES", yet this does not match expectations or ~50% of other "online resources"; there appears much confusion..

The HttpRuntimeSection.RequestLengthDiskThreshold documentation says:

The number of bytes that indicate the input-stream buffering threshold. The default is 80 kilobytes.

However, this documentation is at odds with the default IIS setting of "80" which would be 80 bytes per the first sentence of the documentation; yet it cannot both be 80 bytes and 80 kilobytes, which is the claimed default size.

// Attribute from the documentation link above; can be verified in IIS Manager.
[System.Configuration.ConfigurationProperty(
    "requestLengthDiskThreshold",
    DefaultValue=80)]

What is the actual unit of requestLengthDiskThreshold, and where is it well documented, and/or corrected, without any ambiguity?

PS. There appear to be many "corrections" thrown about in various comments that the unit is bytes, which is suspected to come from this questionable documentation instead of actual validation..

Other contradictory examples:

The "requestLengthDiskThreshold" value in Web.Config is stated in MSDN as being "bytes," but really it is "kilobytes."

0

There are 0 best solutions below