Advertisements

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.

Code

In Web.Config put this code.

//In IIS 7

<system.web>
<httpRuntime maxRequestLength="1048576" executionTimeout="3600" />
</system.web>
<system.webServer>
<security>
<requestFiltering><requestLimits maxAllowedContentLength="3000000000" /></requestFiltering>
</security>
</system.webServer>

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" />  
[/html]

The below code maxAllowedContentLength measured in bytes. 

<requestLimits maxAllowedContentLength="3000000000" />  
Advertisements

How to set Cookieless ASP.NET in WebConfig




rajeeshmenoth.wordpress.com/(S(fkcy42h0yhqrb3g0f0y4j0r5))/pages..

Cookie = “(S(fkcy42h0yhqrb3g0f0y4j0r5))”

//Put this below code in web.config

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

 


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: