PUT handler not found with serviceStack on IIS7.5

家住魔仙堡 提交于 2019-11-29 15:31:13

Some info about IIS + PUT/DELETE Verbs taken from the NancyFx WebFx ASP.NET documentation:

By default IIS 6 does not support PUT and DELETE verbs. To enable this, you need to add a wildcard mapping to the virtual directory of your Nancy application - read the "IIS6 Extension-less URLs" section in this document: http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx

You might receive "405 Not allowed" pages while trying to make PUT/DELETE requests on IIS 7/7.5. One way to fix it is to remove the WebDAVModule in the web.config.

<system.webServer>
    <modules runAllManagedModulesForAllRequests="true">
      <remove name="WebDAVModule" />
    </modules>  
</system.webserver>

Soft PUT / DELETE - Emulating HTTP Verbs

ServiceStack also supports the X-Http-Method-Override HTTP Header which will allow you to simulate a PUT or DELETE with a POST (and vice-versa).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!