如何让 OData DELETE 工作?
我创建了一个 OData 服务(WCF 数据服务)和一个使用者来测试它。
以前,当我尝试删除时,收到 WebDAV 405 错误消息“不允许使用方法”。
所以我用谷歌搜索并发现:
http: //nikhilthaker86.wordpress.com/2010/03/27/issue-hosting-restful-services-on-iis-7/
我按照说明操作并从 IIS 7 中的我的网站(服务)中删除了 WebDav 模块。
现在我收到此错误消息:
“HTTP 错误 500.21 - 内部服务器错误
处理程序“WebDAV”在其模块列表中包含错误的模块“WebDAVModule”模块
:IIS Web Core 通知:ExecuteRequestHandler”
如果您有一个解决方案可以解决这个问题,我将非常感激...否则,如果您是 IIS 专家,并且您在想“这个家伙不知道他在做什么” ,请为我指出一些有用的在线阅读材料。
提前致谢。
I've created an OData service (WCF Data Service), and a consumer to test it.
Previously, when I attempted to delete, I got the WebDAV 405 error message, "Method Not Allowed".
So I googled and found:
http://nikhilthaker86.wordpress.com/2010/03/27/issue-hosting-restful-services-on-iis-7/
I followed the instructions and removed the WebDav module from my website (service) in IIS 7.
Now I get this error message instead:
"HTTP Error 500.21 - Internal Server Error
Handler "WebDAV" has a bad module "WebDAVModule" in its module list
Module: IIS Web Core
Notification: ExecuteRequestHandler"
If you have a solution that will make this problem go away, I would really appreciate it... otherwise, if you're an IIS guru, and you're thinking "This guy has no idea what he's doing", please point me in the direction of some useful online reading material.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
WebDAV 模块将阻止 IIS 的 DELETE 和 PUT(更新)动词。您可以卸载 WebDAV(推荐)或直接从站点的处理程序中将其删除。更多详细信息可以在这里找到:http://forums.iis.net/t/1166025.aspx< /a>
执行此操作的一种方法是将以下
remove
行添加到站点的 web.config 中:The WebDAV module will block both the DELETE and PUT (update) verbs for IIS. You can either uninstall WebDAV (recommended) or simply remove it from the Handlers of the site. More details can be found here: http://forums.iis.net/t/1166025.aspx
One way to do this is to add the following
remove
lines to your site's web.config: