cyprich.com

By

Fixing File Upload Size Limit in IIS 7

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.

12 Responses to Fixing File Upload Size Limit in IIS 7

  1. Pingback: Fixing IIS7 Maximum Upload Size | Twin Harbor Tech Blog

  2. Pingback: Limit Upload File Size « Dako-Code

  3. Pingback: 404 error uploading files over 35mb

  4. Pingback: Trouble uploading files externally

Leave a Reply

Your email address will not be published. Required fields are marked *