Uploading Large File 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.
 
Code 
 
In Web.Config put this code.
  1. <system.web>  
  2.    <httpRuntime maxRequestLength="1048576" executionTimeout="600" />  
  3. </system.web>  
  4. <system.webServer>  
  5.    <security>  
  6.       <requestFiltering><requestLimits maxAllowedContentLength="3000000000" /></requestFiltering>  
  7.    </security>  
  8. </system.webServer>  
The below code maxRequestLength measured in kilobytes.Here is an example with a 1GB request length and a 10 minute request timeout:
  1. <httpRuntime maxRequestLength="1048576" executionTimeout="600" />  
 The below code maxAllowedContentLength measured in bytes. 
  1. <requestLimits maxAllowedContentLength="3000000000" />  
Ebook Download
View all
Learn
View all