title: Ajax Post passing null to Controller
body: <p>I am making an AJAX POST request to an MVC controller, yet the data is coming through as <code>null</code>. I'm not sure why.</p>
  
  <pre class="lang-js prettyprint-override"><code>$(document).ready(function() {
    $("#btnSaveCustomer").click(function() {
      debugger; 
      var data = {
        _DcLink: "1",
        _Account: "Test",
        _Name: "TestName",
        _Title: "Mr",   
        _Init: "T"
      }
  
      $.ajax({
        method: "POST",
        url: '/Customer/SaveCustomer',
        data: JSON.stringify(data),
        success: function() {
          debugger;
          console.log(data)
          alert("Success")
        },
        error: function() {
          alert("Error")
        }
      });
  })
  </code></pre>
  
  <pre class="lang-csharp prettyprint-override"><code>public ActionResult SaveCustomer(string data)
  {
    using (var ms = new MemoryStream(Encoding.UTF32.GetBytes(data)))
    {
      // Deserialization from JSON  
      DataContractJsonSerializer deserializer = new DataContractJsonSerializer(typeof(Customer));
      Customer serializeddata = (Customer)deserializer.ReadObject(ms);
    }
    return Json(new { Success = true });
  }
  </code></pre>
  
  <p>No matter how I try to serialize the data it is always <code>null</code>. I believe the AJAX POST method is not executing properly</p>
  
  <p>I am using dummy data in order to resolve the problem.</p>
  
  <p>The code hits a breakpoint at <code>MemoryStream</code> in the controller - stating data is <code>null</code>.</p>
  
  <blockquote>
    <p>System.ArgumentNullException: 'String reference not set to an instance of a String.
    Parameter name: s'</p>
  </blockquote>
  
  <p>Any help appreciated</p>