Monday, November 26, 2012

How to Upload Large Files in ASP.NET

Hi Guys this is helpful information to upload large size files using Microsoft .net File Up loader, we have to change the web config changes as below described.


1.Navigate to the "web.config" file in your project.  Open the "web.config" file, then locate the "<httpRuntime>" node.As shown in below image.

 


2. Modify the "maxRequestLength" attribute, set to 4096 kilobytes (KB). There are 1000 KB in one megabyte (MB), so if you want to allow file sizes of 10 MB to be uploaded, set the maxRequestLength value to 11264, Microsoft says. This value will enable the application to allow files up to 11000 KB, or 11 MB, to be uploaded.




3.Modify the "executionTimeout" attribute, also in the "<httpRuntime>" node, to enable the application to allow more time to upload the large files before ASP.NET shuts it down. Enter an appropriate value considering the size of the files you will be uploading

4. Add <system.webServer> node in web.config file which avoid IIS Setting problems. as shown in the below Image.



This node should be added with in <configuration> node ends.


You can request for the working example project Email me.