title: Why is my ajax post being truncated?
body: <p>I have just updated my mvc service to include greater error and logging. I have now got this exact error several times. But cannot replicate.</p>
  
  <pre><code>Unterminated string. Expected delimiter: ". Path 'Breadcrumbs[18].Params', line 1, position 59740. at Newtonsoft.Json.JsonTextReader.ReadStringIntoBuffer(Char quote) at 
  </code></pre>
  
  <p>The Path is different each time, depending on what the user is sending to the server.</p>
  
  <p>My ajax requests generally look like this:</p>
  
  <pre><code>$.ajax(myURL("SendBreadcrumbs"), {
              type: "POST",
              cache: false,
              data: { telemetry: telemetry.JSONify(), userID: currentUser, isMyVI: isMyVI }
          })
  </code></pre>
  
  <p>In these cases, userID and isMyVI (boolean) didnt exist and the telemetry string is truncated.</p>
  
  <p>JSONify method is as follows:</p>
  
  <pre><code>self.JSONify = function () {
      var data = ko.mapping.toJSON(self, TelemetryMapping);
      return data;
  }
  </code></pre>
  
  <p>This is knockoutJSs serializer.</p>
  
  <p>Server Side:</p>
  
  <pre><code>public void SendBreadcrumbs(string telemetry, string userID = null, bool isMyVI = true)
  {
      MyServiceAudit audit;
      Guid UserID;
      if (Guid.TryParse(userID, out UserID))
          audit = InsertAudit(UserID);
      else
          audit = InsertAudit(null);
      try
      {
          Models.Telemetry data = JsonConvert.DeserializeObject&lt;Models.Telemetry&gt;(telemetry);
          Controllers.Telemetry.UpdateTelemetry(data, isMyVI);
      }
      catch (Exception ex)
      {
           MyServiceAuditDB.FailAudit(audit.ID, ex.Message + " " + ex.StackTrace);
      }
  }
  </code></pre>
  
  <p>I am completely stumped, i have tried updating the web.config on the server with larger maxvalues etc, to see its truncating on that side.</p>
  
  <p>The only other difference i have in my ajax is a global timeout of 3mins.</p>
  
  <p>Is this as simple as special characters not being handled on client side, or server side limitations, or is the data so large it gets chunked and server side doesn't know to wait for the next chunk?</p>