title: Calling web service using javascript error
body: <p>I try to call webservice using json , when i call to web service without excepted parameters , its work , 
  but when i'm try to send parameter , ive got an error :</p>
  
  <p>This is my code:</p>
  
  <pre><code>function GetSynchronousJSONResponse(url, postData) 
  {
  
      var xmlhttp = null;
      if (window.XMLHttpRequest)
          xmlhttp = new XMLHttpRequest();
      else if (window.ActiveXObject) {
          if (new ActiveXObject("Microsoft.XMLHTTP"))
              xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
          else
              xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
      }
  
      url = url + "?rnd=" + Math.random(); // to be ensure non-cached version
  
      xmlhttp.open("POST", url, false);
      xmlhttp.setRequestHeader("Content-Type", "application/json; charset=utf-8");
      xmlhttp.send(postData);
      var responseText = xmlhttp.responseText;
      return responseText;
  }
  
  
  function Test() 
  {
      var result = GetSynchronousJSONResponse('http://localhost:1517/Mysite/Myservice.asmx/myProc', '{"MyParam":"' + 'test' + '"}');
      result = eval('(' + result + ')');
      alert(result.d);
  }
  </code></pre>
  
  <p>This is the error : </p>
  
  <p>System.InvalidOperationException: Request format is invalid: application/json; charset=utf-8.</p>
  
  <p>at System.Web.Services.Protocols.HttpServerProtocol.ReadParameters()</p>
  
  <p>at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest</p>
  
  <p>What is wrong ? </p>
  
  <p>Thanks in  advance . </p>