maxRequestLength vs. maxAllowedContentLength on IIS 7.5

asp.net-mvc, iis-7, iis-7.5, web-config

Solution

Take a look at the link below - it explains the difference between the two. You'll need to set both if you are going to be uploading large files. Note that you can also nest this setting in a `<location>` tag so as not to apply the setting to the entire website (which I recommend).

Confusing required maxRequestLength and maxAllowedContentLength settings

Problem

maxAllowedContentLength is supposed to work on IIS 7+ servers but apparently my server doesn't want to take this value into account when uploading (ASP.NET MVC 3 website). Now that I included maxRequestLength in web.config everything started to work and the value was applied. Yet everywhere everyone is saying that the maxAllowedContentLength is the right one. Does anyone has an explanation for this behaviour?

Original source

Related problems