Pure ASP.NET Upload Tutorials
Uploading large files
Uploading large files
In this tutorial we will explain how to upload large files.
How to do it
To upload large files you need to:
- Open the Pure ASP.NET Upload dialog
Select the Pure ASP.NET Upload dialog by opening the Server Behaviors Panel. Select DMXzone - Pure ASP.NET Upload.
- Change the timeout
- Save and done
When you need to upload large files, you need to increase the script timeout. You can easily calculate this time:
A 28.8kbps modem can download at a speed of approximately 2,5KB/s. So when you need to upload a file of 1MB (equals to 1.024KB) it will take 1.024 / 2.5 = 410 seconds. Always allow extra time so set the timeout to at least 500 seconds.
Unfortunately, ASP.NET has another mechanism to avoid deadlocks, which should be taken into account. In the machine.config file (usually located in C:\Windows\Microsoft.NET\framework\v1.0xxx.x\config) there is a setting called "responseDeadlockInterval" of the "processModel" node and this must be set to a larger value than the default "00:03:00". It can also be set to = "Infinite".
When the timeout is not sufficient the user will see a timeout error - so always make the timeout larger than you think is necessary.
Save your page and upload it to your server, and you are done! Go to your website and test it - you should be able to upload large files now.
George Petrov
George Petrov is a renowned software writer and developer whose extensive skills brought numerous extensions, articles and knowledge to the DMXzone- the online community for professional Adobe Dreamweaver users. The most popular for its over high-quality Dreamweaver extensions and templates.
George is also the founder of Wappler.io - the most Advanced Web & App Builder