Fixing File Upload Size Limit in IIS 7

Posted by Johan Cyprich on 19 Jun 2008 | Tagged as: How To

Windows 2008 Server and IIS 7 proved to be a real challenge in moving my old IIS 5 applications that were running on Windows XP Pro. Just when I thought everything was running smoothly, I ran into a file size upload limit which I thought I had already adjusted.

In the older IIS, I added the following code to <system.web> in the web.config file in the web application’s folder:

<httpRuntime
  executionTimeout=”100000″
  maxRequestLength=”2000000″ />

This allows a file upload of 2,000,000 kilobytes and it will time out after 100,000 seconds, or 27.8 hours. I think that if someone spends more than 28 hours uploading a file, they should send me a DVD instead.

Adjusting File Size Limit in IIS 7

The problem is that in IIS 7 on Windows 2008 Server, the web application will reject any file that is larger than 30 MB. This is a default limitation of IIS. You can increase the maximum file size by adding the following code to <system.webServer> in the web.config file:

<security>
 <requestFiltering>
  <requestLimits maxAllowedContentLength=”2000000000″ />
 </requestFiltering>
</security>

With the above maxAllowedContentLength, users can upload files that are 2,000,000,000 bytes in size. This setting will work right away without restart IIS services.



Tweet This Tweet This Post!

Related posts:
    Testing Your Internet Connection Speed
    ScanCalc
    Installing Joomla on 1&1
    PostgreSQL Using Too Much Memory

Share this post:

del.icio.us:Fixing File Upload Size Limit in IIS 7 digg:Fixing File Upload Size Limit in IIS 7 spurl:Fixing File Upload Size Limit in IIS 7 wists:Fixing File Upload Size Limit in IIS 7 simpy:Fixing File Upload Size Limit in IIS 7 newsvine:Fixing File Upload Size Limit in IIS 7 blinklist:Fixing File Upload Size Limit in IIS 7 furl:Fixing File Upload Size Limit in IIS 7 reddit:Fixing File Upload Size Limit in IIS 7 fark:Fixing File Upload Size Limit in IIS 7 blogmarks:Fixing File Upload Size Limit in IIS 7 Y!:Fixing File Upload Size Limit in IIS 7 smarking:Fixing File Upload Size Limit in IIS 7 magnolia:Fixing File Upload Size Limit in IIS 7 segnalo:Fixing File Upload Size Limit in IIS 7 gifttagging:Fixing File Upload Size Limit in IIS 7

Follow Me:

Did you find this post interesting and useful? You can keep up to date on this blog by subscribing to my RSS feed, or you can have new posts sent to you by e-mail. You can also follow me on Twitter.


4 Responses to “Fixing File Upload Size Limit in IIS 7”

  1. on 03 Feb 2009 at 12:37 pm 1.Steve said …

    Thanks! Everyone else is having you edit the metabase with cryptic commands that alter the system configs while you have show a simple change to the web.config file. Much superior way!

  2. on 06 Feb 2009 at 12:02 pm 2.Johan Cyprich said …

    Learning how web.config works will help you administer IIS better. There isn’t much available online with this information.

  3. on 20 Jun 2009 at 7:11 am 3.Salem5 said …

    Thank you, way to go. Why ever I have to change that one file a hundred times, is way beyound me. always having to alter my files (espescially the web.config) after writing them in that visual studio development server is a pain.

  4. on 31 Jul 2009 at 6:16 pm 4.whitesites said …

    Thanks for the tip. Finally someone that shows you a simple way to get this done, instead of long DOS commands. You Rock!

Trackback This Post | Subscribe to the comments through RSS Feed

Leave a Reply

CommentLuv Enabled