title: ASP MVC Axios post with model
body: <p>I'm trying to make an Axios post to my CantSignInForAdmin action to send password reset mails. However, I get server error. If I remove the model from the action, it passes no problem, but the model seems to be a problem.
  Here's the request payload:</p>
  
  <pre><code>'{Email: "*****@****.****"}
  Email: "*****@****.****"'
  </code></pre>
  
  <p>Action:</p>
  
  <pre><code> public ActionResult CantSignInForAdmin(CantSignInModel model)
          { ... }
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>let model = { Email: userName, Message: '', Type: '', CurrentState: '' }
              axios({
                  url: `/account/cantsigninforadmin`,
                  method: 'post',
                  contentType: "application/json",
                  data: { Email: userName }
  
              }).then(response =&gt; {
                  console.log(response);
                  }).catch(error =&gt; {
  
                      console.log(error);
  
  
                  });
  </code></pre>
  
  <p>Model:</p>
  
  <pre><code>public class CantSignInModel
      {
          public string Email { get; set; }
  
          public string Message { get; set; }
  
          public string Type { get; set; }
  
          public State CurrentState { get; set; }
  
          public enum State
          {
              Initial,
              UserNotFound,
              EmailSent,
          }
  </code></pre>