title: Increase maxRequestLength for MVC Controller action
body: <p>Can I increase maxRequestLength of ASP.NET request for MVC Controller Action?</p>
  
  <p>I have an MVC controller that accepts file and it can be very large. I increased maxRequestLength in web.config, but it is security issue and the best solution for me will be have increased request length only for Upload method. Is it possible?</p>
  
  <p>I tried </p>
  
  <pre><code>&lt;location path="UploadFile"&gt;
      &lt;system.web&gt;
        &lt;authorization&gt;
          &lt;allow users="*"/&gt;
        &lt;/authorization&gt;
        &lt;httpRuntime maxRequestLength="2097151"/&gt;
      &lt;/system.web&gt;
    &lt;/location&gt;
  </code></pre>
  
  <p>But it didn't helped</p>
  
  <p>Thank you.</p>