When you try to upload files to the Web server in a ASP.NET web application, sometimes you may see the following error:
Request timed out.
This is because the request timeout duration is 110 seconds by default, to increase this timeout value to allow for larger file uploads, you can do it by setting the executionTimeout value for httpRuntime element in the Web.config file:
<configuration>
<system.web>
<!-- max upload file size is 30mb(30720KB), the timeout is 6 minutes -->
<httpRuntime requestValidationMode="2.0" maxRequestLength="30720" executionTimeout="360"/>
</system.web>
</configuration>
Note: This time-out applies only if the debug attribute in the <compilation>
element is set to false
.