PM's Blog

Pramod Mohanan's notes about ASP.NET, MVC, C#, SQL, jQuery, Bootstrap

Uploading huge files

The maximum upload size through ASP.Net by  upload controls is 4096KB (4MB).  If the file size exceeds, the upload fails and results in
Request Timed Out

This can be changed by adding the following in web.config

<system.web>
<httpRuntime executionTimeout="3600" maxRequestLength="1048576" />
</system.web>

The value of maxRequestLength is in KB.  In the above example it is set to 1048576 = 1GB.  The value of executionTimeout is in seconds and its set to 3600=1 hour in above example.

But one thing to remember is that the maximum size permitted is 2GB. To read more about httpRuntimeSection visit http://msdn.microsoft.com/en-us/library/zxe2zh06.aspx

Leave a Reply

Your email address will not be published. Required fields are marked *

PM's Blog © 2015