title: Solution: The length of the string exceeds the value set on the maxJsonLength property for POST action
body: <p>I've following code in MVC. In my POST action <code>params</code> will have huge data. So, I changed <code>web.config</code> accordingly but, I'm getting <strong>ERROR</strong>. Actual problem is controller is not even hitting when POST is called. </p>
  
  <p><code>I tried Following ways</code></p>
  
  <ol>
  <li>Override JsonResult</li>
  <li>followed <a href="https://forums.asp.net/post/4739027.aspx" rel="nofollow noreferrer">Link</a>. Here i couldn't see data which is sent from script. I'm getting <strong>NULL</strong> in <code>base64</code>.</li>
  </ol>
  
  <p><strong>controller.cs</strong></p>
  
  <pre><code> [System.Web.Mvc.HttpPost]
      public bool postImage(string base64)
      {
         return true;
      }
  </code></pre>
  
  <p><strong>web.config</strong></p>
  
  <pre><code> &lt;system.web.extensions&gt;
  &lt;scripting&gt;
    &lt;webServices&gt;
      &lt;jsonSerialization maxJsonLength="2147483644"/&gt;
    &lt;/webServices&gt;
  &lt;/scripting&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>JavaScript</strong></p>
  
  <pre><code>  $.ajax({
    type: "POST",
    url: 'http://localhost:21923/communities/postImage?base64=',
    contentType: "application/json; charset=utf-8",
    data: JSON.stringify(data),
    dataType: "json",
    success: function(data) {
      document.getElementById('test').click();
    },
    error: function(a, b, c) {
      console.log(a);
    }
  })
  </code></pre>
  
  <blockquote>
    <p>Error</p>
  </blockquote>
  
  <p><strong>Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.\r\nParameter name: input</strong></p>