Showing posts with label DELETE. Show all posts
Showing posts with label DELETE. Show all posts

Monday, September 12, 2016

405 - HTTP verb used to access this page is not allowed

We get the above error when we use PUT verb when we access RESTFUL web services.

For this to work, The web site had to continue to enable WebDAV, but the web application needed to turn it off in order to support PUT and DELETE in its REST API.

Below are the approaches I followed to solve my problem.

Procedure 1:

  1. In the IIS Manager, select the application that needs to support PUT.  
  2. In the Features View, find WebDAV Authoring Rules.  Double-click it, or select Open Feature from the context menu (right-click).
  3. In the Actions pane, find and click on WebDAV Settings....
  4. In the WebDAV Settings, find Request Filtering Behavior, and under that, find Allow Verb Filtering.  Set Allow Verb Filtering to False. 2016-09-14_1402
  5. In the Actions pane, click Apply.

Procedure 2:

1. Go to IIS Manager.
2. Click on your app.
3. Go to "Handler Mappings".
4. In the feature list, double click on "WebDAV".

2016-09-14_1411
5. Click on "Request Restrictions".
6. In the tab "Verbs" select "All verbs" .

2016-09-14_1412
7. Press OK.

Hope this helps!