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" />  

How to set Cookieless ASP.NET in WebConfig


Cookie = “(S(fkcy42h0yhqrb3g0f0y4j0r5))”

//Put this below code in web.config

<sessionState mode=”InProc” cookieless=”false” timeout=”30″ />


Timeout expired and The timeout period elapsed prior to obtaining a connection from the pool.


//This may have occurred because all pooled connections were in use and max pool size was reached.

Set in Max Pool Size=500 or above;

Eg :
<add name=DbCon connectionString=”Data Source=.;Initial Catalog=ShaShib;Integrated Security=True;pooling=’true’; Max Pool Size=6000;/>


%d bloggers like this: