When trying to implement interfaces like WebAPI or REST over IIS it’s very common to come across some issues. One of them is the notorious “Method Not Allowed” HTTP error code 405.
Usually, this symptom arises when trying to send a DELETE or PUT (or any other than GET and POST) over HTTP. From my experience WebDAV component is usually the culprit.
Usually, after removing/disabling this component from the IIS solves the issue.
but if it’s not possible to do so from there, here are 2 alternatives:
WebDAV is greyed out in Windows’ Add/Remove features
WebDAV (Web Distributed Authoring and Versioning) a component that is installed on a system level, and sometimes we just don’t have the right permissions to remove it.
How to remove the greyed out WebDAV?
Well, a great alternative to removing it, even if it’s not greyed out is to use the IIS Manager, on an application level, not the whole IIS server.
Goto inetmgr.exe -> under the required site (usually “Default site”) -> feature view and look for WebDAV and try disabling it from there.
Feature View in IIS Application Manager
Remove it from the IIS Manager Modules
Look for WebDAVModule in the modules list -> right click -> remove.
And that should do the trick!