title: file size upload limitation in ASP.NET MVC: more than 1 maxRequestLength setting in web.config(s)
body: <p>I'd like to have more than 1 setting for maxRequestLength - file size upload limitation (e.g. one for File/New, other for Picture/New). All of my Actions take additional parameters (e.g. /File/New?folderId=234).</p>
  
  <p>Single setting works as expected:</p>
  
  <pre><code>&lt;httpRuntime executionTimeout="60" maxRequestLength="1024" /&gt;
  </code></pre>
  
  <p>I tried to have 2 settings with 2 location sections in the root web.config, but without any success. I'm not sure what to write in "path" - physical aspx page of a view, or controller+action... however, nothing seems to work.</p>
  
  <pre><code>&lt;location path="/File/"&gt;
      &lt;system.web&gt;
          &lt;httpRuntime executionTimeout="60" maxRequestLength="4096" /&gt;
      &lt;/system.web&gt;
  &lt;/location&gt;
  &lt;location path="/Picture/"&gt;
      &lt;system.web&gt;
          &lt;httpRuntime executionTimeout="60" maxRequestLength="1024" /&gt;
      &lt;/system.web&gt;
  &lt;/location&gt;
  </code></pre>
  
  <p>I tried to put another web.config in a specific view folder (e.g. /Views/Picture/...), like it works in classic Webform ASP.NET, but this doesn't seem to do the trick either...</p>
  
  <pre><code>&lt;location path=""&gt;
      &lt;system.web&gt;
          &lt;httpRuntime executionTimeout="60" maxRequestLength="1024" /&gt;
      &lt;/system.web&gt;
  &lt;/location&gt;
  </code></pre>
  
  <p>No matter what I do, only one value for httpRuntime.maxRequestLength is applied - that in (root) web.config...system.web.</p>