title: How to increase parameter length in WEB API
body: <p>I am trying to get my WEB API to accept long request strings, but no matter what I try, I end up getting a 400 Bad Request. My method is accessed via: </p>
  
  <blockquote>
    <p><a href="http://server/api/controller/method/" rel="nofollow noreferrer">http://server/api/controller/method/</a>{input}</p>
  </blockquote>
  
  <p>The code is </p>
  
  <pre><code>[HttpGet]
  public IHttpActionResult method(string input) {
     //Do Stuff
     return Ok();
  }
  </code></pre>
  
  <p>The following type of call will work just fine. </p>
  
  <blockquote>
    <p><a href="http://server/api/controller/ShortInputString" rel="nofollow noreferrer">http://server/api/controller/ShortInputString</a></p>
  </blockquote>
  
  <p>However something like: </p>
  
  <blockquote>
    <p><a href="http://server/api/controller/SuperHugeReallyReallyLongInputString" rel="nofollow noreferrer">http://server/api/controller/SuperHugeReallyReallyLongInputString</a></p>
  </blockquote>
  
  <p>results in a 400 Bad Request.</p>
  
  <p>From my understanding, this is because the there is a max length that my input argument can have. I have tried increasing this in the following ways found in other Stack Overflow posts, yet none of them work. </p>
  
  <pre><code>&lt;httpRuntime targetFramework="4.5.2" maxRequestLength="4096"/&gt; //in web.config
  
      &lt;security&gt;
    &lt;requestFiltering&gt;
      &lt;requestLimits maxAllowedContentLength="52428800" /&gt;
      &lt;!--50MB--&gt;
    &lt;/requestFiltering&gt;
  &lt;/security&gt; //also in web.config 
  
  
  config.Formatters.FormUrlEncodedFormatter.ReadBufferSize = int.MaxValue / 10; //in WebApiConfig.cs 
  </code></pre>
  
  <p>None of the above seem to have any impact on the max length the input can be. What am I missing? </p>
  
  <p>Thanks </p>