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.

Windows add remove feature WebDAV is greyed out.

Windows add remove feature WebDAV is greyed out.

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

Feature View in IIS Application Manager

or

Remove it from the IIS Manager Modules

Remove WebDAV from IIS Manager Modules

Remove WebDAV from IIS Manager Modules

Look for WebDAVModule in the modules list -> right click -> remove.

And that should do the trick!

 

Leave a comment