enable all verbs to application hosting on IIS 7.5 and using Asp.net 4.0
Posted on 2011-03-18 18:19 cosophy 阅读(1168) 评论(0) 编辑 收藏 举报These days I run into this issue: my restful service hosting with IIS 7.5 and using Asp.net 4.0 not support PUT or DELETE verbs for http request.
solved.
the following configuration setting fixed our problem:
<modules runAllManagedModulesForAllRequests="true">
<remove name="WebDAVModule" />
</modules>
As reported in [1], this is due to the WebDAV module now being an integral part of IIS 7.5 (and on 7.0 if installed). Removing the module allowed all 4 verbs to come through to our service tier. Cheers!
[1]: http://shouldersofgiants.co.uk/Blog/post/2009/11/27/HTTP-Error-405-With-ASPNet-MVC-and-HTTP-PUT-on-IIS-75.aspx