I'm trying to allow large file uploads from inside a web part, and I'm having some timeout issues. I'm attempting to increase the executionTimeout to deal with this, but I've seen different suggestions.

There are web.config files here:


and here:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS

Where do I make this change? Do they have to be in sync somehow? I've tried changing properties at each location and it's sometimes causing the web app to shut down.


I should note that this is for sharepoint 2010.

More Info

A lot of articles on the web point to 12 hives, so Sharepoint 2007. My guess is that's IIS6 specific. In integrated pipeline on IIS7+, the system.webServer > requestFiltering > requestLimits web.config section is used. In sharepoint, it's set to 2GB, which is more than enough for my requirements.

As for the execution timeout, this can also be set in IIS Manager at Manage web site > advanced settings > connection limits. The default is 120 seconds. Strangely, changing this value does not cause any web.config changes. So, I imagine that the httpRuntime executionTimeout setting has no effect.

This is an interesting post as well (not SP related, but I don't think that matters): http://blog.richardadleta.com/2010/11/aspnet-httpruntime-element.html

And some testing...

I tried uploading a video that was 55mb. The first error I got was maxmimum request length exceeded error. The web.config (at wss\80) has the system.webServer set at 2GB, but the default of the system.web > httpRuntime was 50MB. I changed this to 100MB, and that error disappeared. This is odd, as the system.webServer should be used for integrated pipeline.

I ended up wrapping the upload in a SPLongOperation object, so I that seemed to get around any possible issues with the executionTimeout being exceeded. I'll leave that test to another day, but I was able to upload a video that took 4 minutes to process.

1 Answer 1


You should modify the one in TEMPLATE\LAYOUTS. See here for more information.

Also there are several tweaks and settings you can adjust when working with large files

Consider the footprint of those large files on your server resources. You are basically holding up one IIS thread during the entire upload, as well as causing it to load in memory on both your WFE and your SQL servers. Consider ways to reduce file size in general, or store them elsewhere.

See Working with large files and File Name, Length, Size and Invalid Character Restrictions and Recommendations

  • The files are actually being send to YouTube via their .net API. No local storage.
    – ScottE
    Jan 26, 2012 at 18:32
  • Also, their recommendation is to change both files. Like I said, just changing the wss one caused my web app to crash until I reset it to the original value. Does this need to be done in a certain sequence? Do they have to be in sync somehow?
    – ScottE
    Jan 26, 2012 at 18:35
  • ... And will changing the IIS manager timeout setting from 120 seconds to xxx seconds be sufficient?
    – ScottE
    Jan 26, 2012 at 19:05
  • @ScottE: You're right, my bad for not reading through the entire article. I'm not sure if there is a correct order then, will look into it. Also, when you say sent to YouTube, you mean your webpart is uploading the files and that is the timeout you are trying to increase?
    – Louis
    Jan 26, 2012 at 20:11
  • Yes, the web part is uploading the file.
    – ScottE
    Jan 26, 2012 at 20:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.