Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Increasing Max Upload File Size on IIS7/Win7 Pro

I'm setting up a server for a client (something I don't typically do), and I'm running into issues with uploading larger files (11MB). The server is running Windows 7 Professional with IIS added.

In web.config I've tried setting

<system.web>
    <httpRuntime maxRequestLength="65536" /> <!-- 64MB -->
</system.web>

... and that doesn't work.

I've set

<system.webSecurity>
    <security>
        <requestFiltering>
            <requestLimits maxAllowedContentLength="68157440" />
        </requestFiltering>
    </security>
</system.webSecurity>

... and that doesn't work either.

What am I missing here? As I've said, I don't typically set up servers, so I may be missing something obvious... no suggestion will be scoffed at!

Thanks in advance.

like image 264
Jay Querido Avatar asked May 03 '10 16:05

Jay Querido


People also ask

What is max upload size IIS?

IIS limits the upload file size by default to 30000000 bytes which is approximately 28.6 MB. This can also be caused by a size restriction by the SMTP server configuration.

What is Max allowed content length?

Attributes. Optional uint attribute. Specifies the maximum length of content in a request, in bytes. The default value is 30000000 , which is approximately 28.6MB.

Is 6 upload file size limit?

The default maximum file upload size in IIS6 is 4 MB and 28.6 MB for IIS7.


2 Answers

Change system.webSecurity to system.webServer.

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

If that doesn't work (due to permissions ramifications), set it using appcmd from an elevated command prompt:

appcmd set config "wms/wmsdev" -section:requestFiltering -requestLimits.maxAllowedContentLength:52428800

More info here: http://bloggingabout.net/blogs/ramon/archive/2009/03/13/how-to-enable-large-file-uploads-in-iis7.aspx

like image 190
Dan Gartner Avatar answered Oct 23 '22 01:10

Dan Gartner


It turns out this was a problem with a component used on the front end.

It's worth noting (for anyone stumbling across this in the future), that the suggestions from both Jacob and Dan were required to make this work.

Thanks for your help anyway guys! Much appreciated!

like image 5
Jay Querido Avatar answered Oct 23 '22 02:10

Jay Querido