Fixing File Upload Size Limit in IIS 7

Posted by Johan Cyprich on 19 Jun 2008 | Tagged as: Tech Tips

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.


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.


Trackback This Post | Subscribe to the comments through RSS Feed

Leave a Reply