Uploading Large Files to IIS / ASP.NET

When we upload a large file in asp.net using file upload control we got a error.so how to over come this ? The Default size of Asp.Net is 4MB.


In Web.Config put this code.

//In IIS 7

<httpRuntime maxRequestLength="1048576" executionTimeout="3600" />
<requestFiltering><requestLimits maxAllowedContentLength="3000000000" /></requestFiltering>

The below code maxRequestLength measured in kilobytes.Here is an example with a 1GB request length and a 10 minute request timeout:

<httpRuntime maxRequestLength="1048576" executionTimeout="600" />  

The below code maxAllowedContentLength measured in bytes. 

<requestLimits maxAllowedContentLength="3000000000" />  
%d bloggers like this: