By default, IIS7 limits file upload to 30MB. Oddly, it returns a 404 error if someone uploads something larger than 30MB. The docs from Microsoft are a little confusing on this, so I thought I would try to clarify.
According to the following article, you can "Remove the maxAllowedContentLength property." from the applicationhost.config file in IIS7 to lift the 30MB limit. However, in my case, this property was never in the file to begin with.
http://support.microsoft.com/kb/942074/
So, my assumption on this is that the 30MB limit is somewhere internal to IIS7. The article also doesn't say where to ADD the entry requestLimits node if it isn't already there.
Luckily, there is an alternate solution that can be enabled at the site level rather than server-wide.
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="524288000"/>
</requestFiltering>
</security>
</system.webServer>
If you add the above code to the web.config file for your site, you can control the maximum upload size for your site. In many cases, the system.webServer node will already be in the file, so just add the security node within that.
Note that the maxAllowedContentLength is in BYTES not kilobytes.
You may also need to restart your Web site (not the whole server) to enable the setting.
In case you are curious, why would I want people to upload files larger than 30MB? We were working on a video conversion script that allows people to upload large MOV files and converts them to FLV.






May 24, 2010 at 3:02 AM A simle solution....
Open IIS 7 SnapIn
Select the website you want enable to accept large file uploads.
In the main window double click 'Request filtering'
once the window is opened you may see on top a list of tabs eg: file name extensions, rules, hidden segments and so on...
regardless the tab you select, in the main window rightclick and select "Edit Feature Settings" and modify the "Maximum allowed content length (bytes)"
Now you can upload files larger than 30 MB ....
Jun 6, 2011 at 7:33 AM Great solution to IIS7 File Upload size limits.
Jul 26, 2011 at 1:30 PM very thanks....
Aug 10, 2011 at 5:53 PM many helpings...
Oct 20, 2011 at 9:26 AM Thanks a million!
Was battling with this configuration for the Coporate Content Management System.
Oct 26, 2011 at 6:24 PM thanks.
With this solution,...
I'm uploading larger file (150 Mb), what happend with the time for uploading larger files, it´s too longer..
can i to reduce this time?
Thanks
Nov 8, 2011 at 5:32 PM it works..thanks buddy
Jan 24, 2012 at 12:18 PM Any chance to upload a file over 2Gb in one piece? I need to upload files of at least 10Gb, otherwise IIS is not an option for me. As far as I understand 2Gb is the IIS and ASP.NET limitation, is it fixed in IIS 8 / ASP.NET 4.5?
Jan 24, 2012 at 1:51 PM @WebDAV - To my knowledge it is not possible to do this with IIS 7.5. It has a 2GB max limit. There is also something else working against you. Most browsers limit you to a 2GB upload size anyhow. So, even if IIS would let it through, you might not be able to upload anyhow.
More info here: http://www.motobit.com/help/scptutl/pa98.htm