# IIS7 File Upload Timeout Issues [closed]

I think I have two problems, though they might be related:

• Trying to upload a large file, it fails. Uploading small files works.
• After a while the session times out.

To eliminate the timeout I tried to configure that in web.config file. But it didn't seem to have any effect.

The site is hosted on IIS7.

Changed the web.config as follows:

<system.web>
<httpRuntime requestValidationMode="2.0" enableVersionHeader="false" useFullyQualifiedRedirectUrl="true" maxRequestLength="50384" executionTimeout="3600" requestLengthDiskThreshold="1200"/>

<system.webServer>
<security>
<requestFiltering allowDoubleEscaping="true">
<requestLimits maxAllowedContentLength="60000000"></requestLimits>


Still cannot upload 16 MB file: "the connection with server was reset"

## closed as not a real question by mailq, Iain, GregD, MikeyB, Shane Madden♦Sep 5 '11 at 17:24

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

## 2 Answers

Whilst I don't understand the second question, the first has a few options...

First off, see this blog entry.

Also if you're using classic ASP (rather than .NET) then you'll need to adjust the value against maxRequestEntityAllowed, which you can do through the command line with:

%systemroot%\system32\inetsrv\appcmd set config /section:asp /limits.maxRequestEntityAllowed:nnnn


replacing nnnn with however many bytes you want to allow.

• I want to stop or increase session time , or make it infinity – AMH Sep 5 '11 at 8:25

Regarding large uploading, look up UploadReadAheadSize.

EDIT: IIS has various timeouts that you can set. See, for example, this link:

https://www.iis.net/ConfigReference/system.applicationHost/sites/siteDefaults/limits

• I want to stop or increase session time , or make it infinity – AMH Sep 5 '11 at 8:25