IIS 7.5, Web Service and HTTP 405 error

Solution 1:

After hours of struggling, this is final solution that helped me (tested from fiddler):

  1. On IIS 7.5 -> YourWebsite -> Handler Mappings
  2. Choose "Add module mapping" option on the right side of the panel
  3. In "Request path" field enter *.wsdl
  4. In "Module" field enter "ProtocolSupportModule"
  5. Click on "Request restrictions" and go to Verbs tab
  6. Enter POST verb
  7. Save changes

End voila, fiddler no longer answers with 405 but with happy 200.

Solution 2:

The listed answer didn't work for me, but I was able to fix the problem by running

"%WINDIR%\Microsoft.Net\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe" -r

This re-registered the handler mapping for *.svc

Solution 3:

Goto IIS Manager -> Select Web Site -> Handler Mapping -> Select the handler -> right-click and select edit -> Request restrictions -> verbs tab

Change the value there.

Depending on your extension, it could be a different handler.

Solution 4:

For people who bump into this page but are making requests to a web application with aspx pages, instead of services, there's one important thing to note.

If you make a fiddler http post request to http://localhost/MyApplication, it will throw status 405. But if you specify http://localhost/MyApplication/Default.aspx instead, it will respond correctly (with status 200)

Hope this helps. I've been looking in the wrong place for an hour, debugging handlers, modules, webdav settings, http verbs, etc.