title: WCF fails to deserialize JSON request
body: <p>I'm trying to write a WCF service to respond to ajax requests, but I'm getting a strange error when it tries to deserialize.  </p>
  
  <p>Here's the jQuery:</p>
  
  <pre><code>$.ajax({
      type: 'POST', 
      url: 'http://localhost:4385/Service.svc/MyMethod',
      dataType: 'json',
      contentType: 'application/json',
      data: JSON.stringify({folder:"test", name:"test"})
  });
  </code></pre>
  
  <p>Here's the WCF service definition:</p>
  
  <pre><code>[OperationContract]
  [WebInvoke(UriTemplate = "/MyMethod", 
      Method = "*", //Need to accept POST and OPTIONS
      BodyStyle = WebMessageBodyStyle.WrappedRequest, 
      RequestFormat = WebMessageFormat.Json, 
      ResponseFormat = WebMessageFormat.Json)]
  string[] MyMethod(string folder, string name);
  </code></pre>
  
  <p>I get a <code>SerializationException</code> saying: "The OperationFormatter could not deserialize any information from the Message because the Message is empty (IsEmpty = true)."  </p>
  
  <p>It occurs in method <code>System.ServiceModel.Dispatcher.PrimitiveOperationFormatter.DeserializeRequest</code> on instruction <code>00000108  mov         dword ptr [ebp-18h],0</code></p>
  
  <p>I don't see what I'm doing wrong, but it refuses to work for me.  Been fighting this all day.  Any ideas?</p>