title: Issue with POST call to WCF service - 400 BAD REQUEST
body: <p>I published on my Windows Server a WCF Service on IIS 7.5</p>
  
  <p>It has basically two methods, just for the smoke test .</p>
  
  <p>Here the ServiceContract:</p>
  
  <pre><code>[ServiceContract]
  public interface IFSMServiceWeb
  {
      [OperationContract]
      [WebInvoke(Method="POST", ResponseFormat = WebMessageFormat.Json, 
          BodyStyle = WebMessageBodyStyle.Wrapped, RequestFormat = WebMessageFormat.Json)]
      string registraUtenteViaMail(string username, string password, string key, string dbVersion);
  
  
      [OperationContract]
      [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json,
          BodyStyle = WebMessageBodyStyle.Wrapped)]
      string loginUtenteViaMail(string username, string password, string key, string dbVersion);
  }
  </code></pre>
  
  <p>and here the implementation:</p>
  
  <pre><code>public class FSMServiceWeb : IFSMServiceWeb
  {
  
      public string registraUtenteViaMail(string username, string password, string key, string dbVersion)
      {
          return username + password + key + dbVersion;
      }
  
      public string loginUtenteViaMail(string username, string password, string key, string dbVersion)
      {
          return username + password + key + dbVersion;
      }
  }
  </code></pre>
  
  <p>I have no problem to call the method call loginUtenteViaMail with GET, <strong>but I cannot call method registraUtenteViaMail with POST method</strong>.</p>
  
  <p>Here javascript code used to test POST method</p>
  
  <pre><code>$(document).ready(function(){
  
  
  $("#send").click(function(){
  
      var username =  $("#username").val();
      var password =  $("#password").val();
      var key =       $("#key").val();
      var dbVersion = $("#dbVersion").val();
      var dati = {username : username, password : password, key : key, dbVersion : dbVersion};
  
      $.ajax({
          type: 'POST',
          url: '/FSMServiceWeb.svc/registraUtenteViaMail',
          data: JSON.stringify(dati),
          success: function (data) {
              console.log(data);},
              error: function (data){},
          dataType: 'JSON'
      });
  });
  });
  </code></pre>
  
  <p>I obtain this error (Chrome Console):</p>
  
  <pre><code>POST http://xxx.xxx.xxx.xxx/FSMServiceWeb.svc/registraUtenteViaMail 400 (Bad Request)                         jquery.min.js:4 
  l.cors.a.crossDomain.send     jquery.min.js:4 
  o.extend.ajax                 POSTtest.js:12 
  (anonymous function)         jquery.min.js:3 
  o.event.dispatch             jquery.min.js:3 
  r.handle                     jquery.min.js:3 
  </code></pre>
  
  <p>Where am I wrong?</p>
  
  <p>Thank you in advance</p>