IIS 7.5 405 Method Not Allowed for PUT from StaticFileModule

断了今生、忘了曾经 提交于 2019-12-24 17:08:44

问题


I'm integrating a 3rd party xml editor into our web app and the save function performs an HTTP PUT directly to the file on the web server.

The OS is Windows Server 2008 R2 using IIS 7.5

We have a Web API installed so we already have WebDAV removed and also have updated the web.config with:

<remove name="WebDAVModule" /> under modules
<remove name="WebDAV" /> under handlers

We've updated the Handler Mappings of the site to include the 'PUT' verb:

  • StaticFile

  • ExtensionlessUrlHandler-ISAPI-4.0_32bit

  • ExtensionlessUrlHandler-ISAPI-4.0_64bit

We still continue to get the following response in fiddler when we make a PUT request to an xml file in the Composer:

HTTP Error 405.0 - Method Not Allowed

The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used.


Module :     StaticFileModule 

Notification :     ExecuteRequestHandler 

Handler :     StaticFile 

Error Code :     0x80070001 

回答1:


When you installed your aplication in IIS in Module:

Find WebDav and remove the same step you must do in Handler Mappings - remove WebDav and refresh all.




回答2:


Add PUT, DELETE verbs to PHP.cgi request restrictions.

IIS -> Sites -> DOMAIN.COM -> Handler Mappings -> Edit the CGI handler handling your requests -> Request Restrictions -> Verbs tab.



来源:https://stackoverflow.com/questions/36629067/iis-7-5-405-method-not-allowed-for-put-from-staticfilemodule

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