Last post May 16, 2011 04:33 AM by ayrenj
May 11, 2011 10:46 AM|ayrenj|LINK
This maybe the wrong place to post this question but I am looking at it from an architecture perspective. This question has been asked before from search on the forum but it was not answered so I am posting it again.
What is the difference between "maxRequestLength" and "requestLengthDiskThreshold"? Like in the case below.
<httpRuntime executionTimeout="300" maxRequestLength="20000" useFullyQualifiedRedirectUrl="false" requestLengthDiskThreshold="8192"/>
There are lots of conflicting information on the net and would like to know what effect I will have on a website by adding this key.
BTW - This would go in the web.config file for those that do not know.
May 12, 2011 03:11 PM|atconway|LINK
The MaxRequestLength is the overall total length the request cannot exceed. The RequestLengthDiskThreshold should be less than the MaxRequestLength value and indicates at what point or 'threashold' that the request will begin to be buffered transparently
onto disk. So take your following example:
<httpRuntime maxRequestLength="20000" requestLengthDiskThreshold="8192"/>
In this case the overall request cannot exceed 20000 kilobytes, and once the request crosses over the 8192
bytes threshold (Notice MaxRequestLength value is kilobytes and RequestLengthDiskThreshold is in bytes), the request will begin to buffer to disk (not be in memory anymore). The affect is when you want that request to stop being in memory and
start to write or buffer to disk. Honestly I do not change the default value of 'RequestLengthDiskThreshold' to often; I leave it at the 256 byte threshold. Increasing this value might chew up too much memory in IIS and on the server, so buffering to disk
does help keep memory management under control.
Hope this helps!
May 16, 2011 04:33 AM|ayrenj|LINK
Thanks. That does help a lot.