In ASP.NET 2.0, there's a new attribute for the <httpRuntime> configuration section called requestLengthDiskThreshold. If any request body exceeds this number of kilobytes (MS documentation says bytes), the request will be buffered on disk.
Yeah, this lets you have 50 clients uploading 1GB without the need for at least that much RAM for buffering.
If this threshold is greater than the maximun requestLength, the request body will always be buffered in memory, effectively disabling on-disk buffering.
The default values for the mentioned attributes are:
This feature was requested by many people using the ASP.NET 1.1, so in Mono we decided to make it available for both ASP.NET 1.1 and 2.0. If you run Mono from HEAD, you are already using it.
Beware of sending a large byte[] or string to a web service, as the XML parsing code will still create large in-memory buffers to process the data.
blog comments powered by Disqus