3

I have a do a call via AJAX and by Delete verb method, but the response from the IIS server is 405 Method Not Allowed.

I have read about it. Apparently is all ok, I have no webDAV installed. I tried to define handlers, modules etc... and I can't get success!!!.

This is the detailed error info:

Module StaticFileModule

Notification ExecuteRequestHandler

Handler StaticFile

Error Code 0x80070001

Anyone get this error too? Any light about it?

Tekno
  • 193
  • 1
  • 1
  • 11

2 Answers2

6

Calling DELETE from AJAX to an ASHX file returned a 405 Method Not Allowed error on IIS 7. WebDAV was not installed. The site is .Net 4.0 and uses an Integrated Pipeline Mode application pool.

The error response included:

Module StaticFileModule

Notification ExecuteRequestHandler

Handler StaticFile

Error Code 0x80070001

The solution for me was to open the Handler Mappings feature for the website in IIS Manager.

Select SimpleHandlerFactory-Integrated from the Handler Mappings, this had *.ashx as the path.

Click on Edit in the Actions pane to open the Edit Managed Handler dialog and then click the Request Restrictions button.

Select the Verbs tab and add DELETE to the verbs list.

StuperUser
  • 10,555
  • 13
  • 78
  • 137
user880647
  • 61
  • 2
  • Great. If your script handler is *.php, *.rb or whatever use that one instead. Others answers suggested to uninstall WebDav but this solved it fore me. – wp78de Jun 26 '18 at 20:15
1

In your IIS site you can go to Request Filtering -> HTTP Verbs and see if DELETE wasn't explicitly denied.

Also when you go to Handler Mappings and for example you Edit the handler for your .axd files (something that ends on aspnet_isapi.dll) there is a button Request restrictions... and there is a tab Verbs, where you can see if DELETE was specified.

  • I tried that before, and that dit not work for me. In filtering DELETE is not denied and modifying handler also didn't work. So strange!! – Tekno Apr 12 '12 at 16:36