eRongs Geo-Info Technical Blog

Blogging 3S , Programming ,etc.
posts - 30, comments - 40, trackbacks - 0, articles - 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