title: Posting a large JSON object to ASP.NET MVC
body: <p>I'm using KnockoutJS's mapping pluggin to convert my model into Knockout objects. But I'm having issues sending the large json object back to the server. My ajax call looks like this:</p>
  
  <pre><code>$.ajax({
      url: "/home/DoStuff",
      type: "POST",
      data: JSON.stringify({ deal: ko.toJS(myObjectViewModel) }),
      contentType: "application/json",
      dataType: "json",
      success: function (result) {
          console.log(result);
      },
      error: function (xhr, status, message) {
          console.log(xhr);
      }
  });
  </code></pre>
  
  <p>Executing this script never hits the <code>DoStuff</code> action in the controller. When I inspect with Firebug, the POST just keeps spinning. In the Net tab of Firebug, it says the Post Body is 159.9 KB and Total Sent is 165.1 KB (including the headers). If it was sent, why is it not hitting my breakpoint in the code?</p>
  
  <p>But when I instead send just a property of <code>myObjectViewModel</code>, it posts fine and everything is successful. So that leads me to assume the issue is with the size of the data being posted. So I tried increasing the maxJsonLength.</p>
  
  <pre><code>&lt;system.web.extensions&gt;
      &lt;scripting&gt;
          &lt;webServices&gt;
              &lt;jsonSerialization maxJsonLength="2147483644"&gt;&lt;/jsonSerialization&gt;
          &lt;/webServices&gt;
      &lt;/scripting&gt;
  &lt;/system.web.extensions&gt;
  </code></pre>
  
  <p>This didn't help. </p>
  
  <p>Is there something else I should be doing?</p>