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.

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

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

Method 2

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!

Method 3

In the event that it’s timing out, I’d add executionTimeout=”50000″ to your httpRuntime element.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x