在 IIS 6.0 中运行时,PUT 和 DELETE 在 WCF REST 服务 .net 4 中获得 404 [英] PUT and DELETE getting 404 in WCF REST service .net 4 when running in IIS 6.0

查看:49
本文介绍了在 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.

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.

我已在 Web 服务扩展下禁止和允许 WebDav.

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

应用程序在开发环境中运行时表现出色.在 IIS 中运行应用程序时,PUT 和 DELETE 不起作用.

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

感谢任何帮助.

推荐答案

您是否在链接到 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 the HTTP Verbs you wish to use defined.

这篇关于在 IIS 6.0 中运行时,PUT 和 DELETE 在 WCF REST 服务 .net 4 中获得 404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆