Karatas, FERHAT
I would love to change the world, but they won't give me the source code!
Large File Uploading in ASP.NET
17.10.2008 09:40:28 - Filed under : Asp.net
In your web.config, add a line under your system.web <httpRuntime executionTimeout="54000" maxRequestLength="512000" /> where execution timeout is in seconds, and maxRequestLength is in KB. executionTimeout, is basically the amount of time a thread will continue to run, and accept data by IIS/.NET. maxRequestLength, is the total amount of data that can be sent through HTTP Post to the server. The default is 4MB (4096)...and is generally set low so that your server will not be overwhelmed by possible DoS attacks.

Memory deallocation is a major issue, that has no current solution. Whenever you upload files via HTTP Post, the file is stored in the memory of the aspnet_wp.exe process, and never deallocates completely (if your lucky a few MB gets released). One of the config settings for .NET processes, allows them to utilize 60% of physical memory on the server, at which point the process is recycled and all execution is stopped. Whenever a new upload is started, though, some memory is de-allocated, but not enough compared to memory that was used in prior uploads.

Microsoft is aware of this problem, and has assured us that it will be fixed with some upcoming releases of the .NET framework. Some solutions that they suggested to us, was to use Classic ASP, Third Party Components, or Custom Built ISAPI filters.

NeatUpload
The NeatUpload ™ ASP.NET component allows  developers to stream uploaded files to storage (filesystem or database) and allows users to monitor upload progress. It is open source and works under Mono's XSP/mod_mono as well as Microsoft's ASP.NET implementation.
Streams uploads directly to storage.  This conserves server memory, allows larger uploads, and helps prevent Denial of Service attacks.
It features 2 custom controls:  InputFile allows the user to select a file to upload, and ProgressBar displays the upload progress either inline or in a popup. ProgressBar uses AJAX-style refreshless updates on modern browsers when JavaScript is available, but also allows users without JavaScript to see upload progress.

http://www.brettle.com/neatupload

Keywords : NeatUpload, Large File Upload, maxRequestLength, executionTimeout.
with 0 comments

What do you think ?
Security Code 4247
Check S. Code
Name  
Email  
Home Page  
Comments