views:

51

answers:

1

Hi all,

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.

+1  A: 

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.

Ladislav Mrnka
+1: True... I have added:<modules runAllManagedModulesForAllRequests="true"> <remove name="WebDAVModule" /> </modules>
lmsasu