title: WCF (Rest) service errors when JSON object has a long string
body: <p>I have a WCF service implemented using the WebServiceHostFactory (REST).</p>
  
  <p>I'm calling a service end point as a POST sending a json object that has a string property.</p>
  
  <p>This works up to a point but it seems that if the length of that string gets too long (not sure exactly how long (8000 chars works but 9000 does not ... I did not try but 'breaking point' might be 8192).</p>
  
  <p>I attempt to check the StatusCode in the call back which works fine for smaller strings but when the sting is 'too long' the code below errors with:</p>
  
  <pre><code>System.Net.WebException: The remote server returned an error: NotFound.
  </code></pre>
  
  <p>Callback code:</p>
  
  <pre><code>var request = (HttpWebRequest)result.AsyncState;
  var response = (HttpWebResponse)request.EndGetResponse(result);
  </code></pre>
  
  <p>I'm trying to figure out where the problem is, since the service exists and I only get this when the string is too long.  </p>
  
  <p>Is it the json object size?  Is it my service definition?  Is this something in WCF?</p>
  
  <p>Thanks</p>