Enabling html PUT method on IIS 7.5

帅比萌擦擦* 提交于 2019-12-22 07:00:06

问题


I'm doing a iCal Service to allow sync between Calendar instances and runs fantastic on localhost (under VS2010 Web Server)

But now That I hosted on a Windows 2008 R2 (IIS 7.5.7600) I couldn't create not even update an event :-o

Thunderbird always said

So I rush into Fiddler and found out the problem

a 405 error

That says PUT is not allowed :(

How can I enabled this method? Application Pool? WebSite definition? IIS Settings?


回答1:


We just need to remove the WebDav Service

Control Panel > Program and Features > Turn Windows features on or off

then navigate to Server Manager > Roles > Web Server (IIS) and wait until Roles Services come up.

Then Remove Role Service and Remove WebDAV Publishing

You need to restart the Server to finalize this action.

I hope it helps someone




回答2:


You can do it from configuration file.

<system.webServer>
<handlers>
<remove name="WebDAV" />
      <remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" />
      <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit"
        path="*."
      verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS"
      modules="IsapiModule"
      scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll"
      preCondition="classicMode,runtimeVersionv4.0,bitness64"
      responseBufferLimit="0" />
</handlers>
</system.webServer>

Source: http://www.asp.net/web-api/overview/testing-and-debugging/troubleshooting-http-405-errors-after-publishing-web-api-applications



来源:https://stackoverflow.com/questions/3946283/enabling-html-put-method-on-iis-7-5

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