PUT and DELETE getting 404 in WCF REST service .net 4 when running in IIS 6.0

吃可爱长大的小学妹 提交于 2019-12-10 17:24:17

问题


I've added the wildcard application mapping for c:\windows\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll and unchecked the "verify that file exist" checkbox. This gives me GET and POST ability but not PUT and DELETE.

I have both prohibited and allowed WebDav under the web service extensions.

Application works like a champ when running in development environment. PUT and DELETE don't work when running app in IIS.

Any help is appreciated.


回答1:


Have you defined the extra verbs in the ISAPI extension that is linked to WCF?
To do this, open up IIS and edit the properties of the website. From their click on the Home Directory tab, and then the configuration button. In the mappings tab find the appropriate extensions, and double click it. In the new window you will find a field called "Limit To" which should have the HTTP Verbs you wish to use defined.




回答2:


Old Question but worth a potential solution:

Check you don't have http://www.iis.net/downloads/microsoft/urlscan installed, by default it disallows PUT and DELETE amongst other verbs.



来源:https://stackoverflow.com/questions/5887089/put-and-delete-getting-404-in-wcf-rest-service-net-4-when-running-in-iis-6-0

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