OMGWTFIIS?!?!

scream and shout

I am working on some automation to allow a large zip file to be uploaded, extracted, parsed, etc. While working locally, things worked fine. Once I pushed to our dev server, it all fell apart.

The file is 30MB – I did not really think that was too large, but apparently there is a nice, hidden gem in IIS – an artificial limit of 30MB. It was driving me nuts because I could upload a bunch of other zip files, but not the one I needed to. That led me to think it had something to do with the size, and lo and behold that is it.

I found the magic google incantation to find a post on IIS7 file upload size limits. This post gives a great overview about the silliness that exists, and a nice site-level solution:

<system.webServer>
  <security>
    <requestFiltering>
      <requestLimits maxAllowedContentLength="524288000"/>
    </requestFiltering>
  </security>
</system.webServer>

A commenter outlines a solution using the IIS7 snap-in, but I am okay with the web.config method. For completeness, here are the steps:

  1. Open IIS7 snap-in
  2. Select the site to enable large file uploads
  3. Double click “Request Filtering” in the main window
  4. Right-click the dialog window and select “Edit Feature Settings”
  5. Modify the “Maximum allowed content length (bytes)

So, at least I got everything working, but I sure wasted a whole bunch of my time before I found this…

photo by: mdanys