在 IIS 6.0 中运行时,PUT 和 DELETE 在 WCF REST 服务 .net 4 中获取 404
我已添加 c:\windows\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll 的通配符应用程序映射,并取消选中“验证该文件存在”复选框。这给了我 GET 和 POST 能力,但没有 PUT 和 DELETE 能力。
我在 Web 服务扩展下同时禁止和允许 WebDav。
应用程序在开发环境中运行时表现出色。在 IIS 中运行应用程序时,PUT 和 DELETE 不起作用。
任何帮助表示赞赏。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否在链接到 WCF 的
ISAPI
扩展中定义了额外的动词?为此,请打开
IIS
并编辑网站的属性。单击主目录选项卡,然后单击配置按钮。在映射选项卡中找到适当的扩展名,然后双击它。在新窗口中,您将找到一个名为“Limit To”的字段,其中应定义了您希望使用的HTTP
动词。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 theHTTP
Verbs you wish to use defined.老问题但值得一个潜在的解决方案:
检查您没有 http://www.iis.net安装了 /downloads/microsoft/urlscan,默认情况下它不允许 PUT 和 DELETE 等动词。
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.