Hi there,
Web API apps typically use several HTTP verbs: GET, POST, PUT, DELETE, and sometimes PATCH. That being said, developers may run into situations where those verbs are implemented by another IIS module on their production IIS server, which leads to a situation where a Web API controller that works correctly in Visual Studio or on a development server will return an HTTP 405 error when it is deployed to a production IIS server.
You can Troubleshoot Web API2 apps that work in Visual Studio and fail on a production IIS server from here https://learn.microsoft.com/en-us/aspnet/web-api/overview/testing-and-debugging/troubleshooting-http-405-errors-after-publishing-web-api-applications
---------------------------------------------------------------------------------------------------------------------------------
If the reply is helpful, please Upvote and Accept it as an answer