User753101303 posted
You are using ASP.NET 4.x or Core? This is an MVC or an API controller? Some more context could help.
Generally, you can use attributes such as [HttpPost], [HttpPut] and so on to tell explicitly which that an action should respond to a given http verb. See earlier if you want to disable the PUT verb at the IIS level.
Edit: I tested an [ApiController] with ASP.NET Core 5.x and it does show a 405 status code.