title: ASP.Net MVC doesn't map parameters for ajax call
body: <p>I want to send a request with several parameters in ASP.Net Core 1.0 (I don't know if it matters).</p>
  
  <p>I have following model:</p>
  
  <pre><code>[DataContract]
  public class RegistrationConfigContract
  {
      [DataMember]
      public string ServiceType { get; set; }
      [DataMember]
      public int BatchTimeout { get; set; }
      [DataMember]
      public int BatchSize { get; set; }
      [DataMember]
      public ActorFinishingTypeEnum FinishingType { get; set; }
  }
  </code></pre>
  
  <p>I have following controller method:</p>
  
  <pre><code>public void SendRegistration(string nodeName, NodeTypeEnum nodeType, RegistrationConfigContract model)
  {
  
  }
  </code></pre>
  
  <p>I also have a JS that tries to call it:</p>
  
  <pre><code>function sendRegistration(nodeName, nodeType) {
      var model = {
          ServiceType: $("#serviceType").html(),
          BatchTimeout: $("#batchTimeout").html(),
          BatchSize: $("#batchSize").html(),
          FinishingType: $("#finishingType").html()
      };
  
      var request = {
          nodeName: nodeName,
          nodeType: nodeType,
          model: model
      }
  
      //$.post('@Url.Action("SendRegistration")', request);
      $.ajax({
          url: '@Url.Action("SendRegistration")',
          type: "POST",
          dataType: 'json',
          data: JSON.stringify(request),
          async: false,
          cache: false,
          traditional: true,
          contentType: 'application/json'
      });
  }
  </code></pre>
  
  <p>But on server side I always get nulls while on JS side everything is fine, according to Chrome/Edge debugger. </p>
  
  <p>What am I doing wrong here? I tried to use code I googled for this problem, but it doesn't work.</p>
  
  <p>Raw HTTP request:</p>
  
  <pre><code>POST http://localhost:8080/Configuration/SendRegistration HTTP/1.1
  Host: localhost:8080
  User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
  Accept: application/json, text/javascript; q=0.01
  Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3
  Accept-Encoding: gzip, deflate
  DNT: 1
  Content-Type: application/json
  X-Requested-With: XMLHttpRequest
  Referer: http://localhost:8080/Configuration
  Content-Length: 156
  X-Compress: 1
  Proxy-Authorization: 6e9b34bd44817cf5c254e1ccb4fe7b31ecd526ea9e025e06a16baca626af6be0ea7fa102c2205f0e
  Connection: keep-alive
  
  {"nodeName":"zhdp","nodeType":"DocumentProducer","model":{"ServiceType":"jjjjjj","BatchTimeout":"33535","BatchSize":"6666","FinishingType":"UpdateMessage"}}
  </code></pre>