title: MVC Web API, Error: Can't bind multiple parameters
body: <p>I get error when passing the parameters, </p>
  
  <blockquote>
    <p>"Can't bind multiple parameters"</p>
  </blockquote>
  
  <p><strong>here is my code</strong></p>
  
  <pre><code>[HttpPost]
  public IHttpActionResult GenerateToken([FromBody]string userName, [FromBody]string password)
  {
      //...
  }
  </code></pre>
  
  <p><strong>Ajax:</strong></p>
  
  <pre><code>$.ajax({
      cache: false,
      url: 'http://localhost:14980/api/token/GenerateToken',
      type: 'POST',
      contentType: "application/json; charset=utf-8",
      data: { userName: "userName",password:"password" },
  
      success: function (response) {
      },
  
      error: function (jqXhr, textStatus, errorThrown) {
  
          console.log(jqXhr.responseText);
          alert(textStatus + ": " + errorThrown + ": " + jqXhr.responseText + "  " + jqXhr.status);
      },
      complete: function (jqXhr) {
  
      },
  })
  </code></pre>