"405 method not allowed" in IIS7.5 for "PUT" method

I enabled the Failed Request Tracing, and got the following info:

 <EventData>
  <Data Name="ContextId">{00000000-0000-0000-0F00-0080000000FA}</Data>
  <Data Name="ModuleName">WebDAVModule</Data>
  <Data Name="Notification">16</Data>
  <Data Name="HttpStatus">405</Data>
  <Data Name="HttpReason">Method Not Allowed</Data>
  <Data Name="HttpSubStatus">0</Data>
  <Data Name="ErrorCode">0</Data>
  <Data Name="ConfigExceptionInfo"></Data>
 </EventData>

So, I uninstalled the WebDAVModule from my IIS, everything is fine now~

The IIS tracing feature is very helpful.


Taken from here and it worked for me:

  1. Go to IIS Manager.

  2. Click on your app.

  3. Go to "Handler Mappings".

  4. In the feature list, double click on "WebDAV".

  5. Click on "Request Restrictions".

  6. In the tab "Verbs" select "All verbs" .

  7. Press OK.


Often this error is caused by the WebDAV module that try to handle this kind of requests. An easy solution is to remove it from modules and from handlers of the system.webServer section just inside your web.config file. Here a configuration example:

<system.webServer>
    <modules>
        <remove name="WebDAVModule" />
    </modules>
    <handlers>
        <remove name="WebDAV" />
    </handlers>
</system.webServer>

I tried most of the answers and unfortunately, none of them worked in completion.

Here is what worked for me. There are 3 things to do to the site you want PUT for (select the site) :

  1. Open WebDav Authoring Rules and then select Disable WebDAV option present on the right bar.

  2. Select Modules, find the WebDAV Module and remove it.

  3. Select HandlerMapping, find the WebDAVHandler and remove it.

Restart IIS.

Tags:

Iis

Iis 7