Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebDav troubles for restfull WCF web service

I created a WCF restfull service in .NET 4 and I published it under IIS 7.5/windows 7 x86. The verbs GET and POST worked fine, but the DELETE and PUT gave an error:

Error: The remote server returned an error: (405) Method Not Allowed.

After googling (a lot), I've found out that the problem is caused by WebDav module which is installed (automatically? dunno) in IIS. The only approach that worked for me was the one found here.

However, removing the webdav module from the entire web site is somewhat too intrusive, in my opinion. Does anyone know another approach to inhibit the filtering action on verbs imposed by webdav, but only for a specific web application, not for the whole website?

Thank you.

EDIT I know about missing put and delete still leads to restful service - but I keep wanting to allow these verbs.

like image 885
lmsasu Avatar asked Sep 19 '10 08:09

lmsasu


1 Answers

You don't need to remove module for whole site. You can configure modules per application. Modules section is available in Management console per application.

You really have to remove WebDav for REST service's application because PUT and DELETE verbs were formerly defined for WebDav and are consumed by WebDav automatically.

like image 180
Ladislav Mrnka Avatar answered Sep 20 '22 19:09

Ladislav Mrnka