Set max upload size for IIS7 web applications

If you want to set the maximum request size, e.g. to define the maximum size for file uploads, you can use the way described in this post:

http://developers.de/blogs/nadine_storandt/archive/2009/04/24/moss-set-max-upload-size-on-iis-7.aspx (thanks to Nadine)

This command line tool just adds a new node to the web.config file of the target application. This node is added to the <system.webServer> section:

   1: <security>
   2:     <requestFiltering>
   3:         <requestLimits maxAllowedContentLength="52428800" />
   4:     </requestFiltering>
   5: </security>

The value of the maxAllowedContentLength attribute is the number of bytes for the request.
If you want to allow 50 MB file upload this means 1024 x 1024 x 50 = 52428800


Posted Jun 24 2009, 01:52 PM by alehmann
Filed under: ,

Comments

LukeSkyWalker wrote re: Set max upload size for IIS7 web applications
on 05-21-2010 22:30

GREAT!

Peter wrote re: Set max upload size for IIS7 web applications
on 01-21-2012 12:34

Does not work for new ISS 7 .

No changes for me . Sorry

developers.de is a .Net Community Blog powered by daenet GmbH.