title: Getting 404 when calling a post method on Web API
body: <p>I have an API controller which have standard GET,POST and Delete actions.</p>
  
  <pre><code>[Route("api/[controller]")]
  [ApiController]
  public class UsersController : ControllerBase
  {
      //Get
      [HttpPost]
      public async Task Post([FromBody] TestUser testUser, string tempPassword, role = "Guest")
      {
  
      }
  }
  </code></pre>
  
  <p>Now I am adding a new action using:</p>
  
  <pre><code>[HttpPost]
  [Route("api/[controller]/UpdateRole")]
  public async Task Post(string email, List&lt;string&gt; roles)
  {
  }
  </code></pre>
  
  <p>When I am trying to call the API using postman , </p>
  
  <p>Type : POST
  Endpoint : <a href="http://localhost/api/users/UpdateRole" rel="nofollow noreferrer">http://localhost/api/users/UpdateRole</a></p>
  
  <p>Request body:</p>
  
  <pre><code>{
      "email":"something@mail.com",
      "roles":["S1","s3"]
  }
  </code></pre>
  
  <p>But I am getting a <code>404</code> as response back. On server I can see , </p>
  
  <blockquote>
    <p>the application completed without reading the entire request body.</p>
  </blockquote>