PUT handler not found with serviceStack on IIS7.5

后端 未结 1 1830
伪装坚强ぢ
伪装坚强ぢ 2020-12-21 10:18

I am currently using serviceStack for creating REST based services which are hosted in a MVC web application.

So far ServiceStack has been amazing and I have achieve

相关标签:
1条回答
  • 2020-12-21 11:05

    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).

    0 讨论(0)
提交回复
热议问题