title: I keep getting 415 error while post json data to asp.net controller
body: <p>I am trying to develop simple jouneral voucher form.</p>
  
  <pre><code>var Things=[];
      function addNewEntry() {
              var thing =  {
              //Id: parseInt($('#Id').val()),
              AcNumber: $('#AcNumber').val(),
              TranAmount: parseInt($('#TranAmount').val()),
              TranType: $('#TranType').val(),
              Tdate: $('#Tdate').val(),
  
          };
              things.push(thing);
              return things;
  
          }
  
  function clickPostBtn() {
              $('#post').click(function (ev) {
                  console.log('post botton work started');
                  ev.preventDefault();
                  addNewEntry();
                  //debit credit validation
                  var myJsonString = JSON.stringify(things);
                  $.ajax({
                          contentType: 'application/Json; charset=UTF-8',
                          dataType: 'json',
                          type: 'POST',
                           url: '/Transaction/DoubleEntry',
                           data: myJsonString,
                          success: function () {
                              alert('success');
                          },
                          failure: function (response) {
                              $('#result').html(response);
                          }
  
                      });
                      document.getElementById('myform').submit();
  </code></pre>
  
  <p>my controller looks like below</p>
  
  <pre><code>        public IActionResult doubleentry([FromBody] IEnumerable&lt;TransactionTbl&gt; trans)
      {
         //do something with incoming data
  
          return RedirectToAction("dummyview", "Transaction");
      }
  </code></pre>
  
  <p>whenever i click post button, data do get my controller but throw 415 after that,
  i have tried with in ajax
  application/x-www.formencoded
  multipart/formdata</p>
  
  <p>with and without binding attribute in controller.</p>