How can I enable DELETE verb in IIS7?

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?

model-view-controller
iis
httpverbs
asked on Stack Overflow Apr 12, 2012 by Tekno

2 Answers

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.

answered on Stack Overflow May 16, 2012 by user880647 • edited Feb 11, 2013 by StuperUser
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.

answered on Stack Overflow Apr 12, 2012 by Lubomir Velkov

User contributions licensed under CC BY-SA 3.0