Windows server 2008 and large files

I recently came across an issue while trying to upload large files into Umbraco: they would always timeout, even after the usual changes on the web.config file:

1
2
3
4
<system.web>
<httpRuntime maxRequestLength="1048576" executionTimeout="3600" />
...
</system.web>

Yesterday, while plotting on my batcave, I came across the solution (and the problem). IIS7 on Windows Server 2008 is limited to a maximum upload size of 30MB. You will need to do the following changes on your web.config file to able to upload large files:

1
2
3
4
5
6
7
8
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="200000000" />
</requestFiltering>
</security>
...
</system.webServer>

That will do it. Also, if you (and your clients) are uploading large files into Umbraco, using the Desktop Media Uploader is probably a good idea. The only issue I found is that it is not able to recognize custom media types.

Good bedtime reading:
Large file uploads in ASP.NET