我怎样才能得到的OData DELETE工作? [英] How can I get OData DELETE to work?

查看:701
本文介绍了我怎样才能得到的OData DELETE工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建OData服务(WCF数据服务),以及消费者对其进行测试。

I've created an OData service (WCF Data Service), and a consumer to test it.

previously,当我试图删除,我得到了WebDAV的405错误信息,不允许的方法。

Previously, when I attempted to delete, I got the WebDAV 405 error message, "Method Not Allowed".

所以,我用Google搜索,发现:

So I googled and found:

http://nikhilthaker86.word$p$pss.com/2010/03/27/issue-hosting-restful-services-on-iis-7/

我也跟着指示,并从我的网站(服务)在IIS 7中删除WebDAV模块。

I followed the instructions and removed the WebDav module from my website (service) in IIS 7.

现在我收到此错误消息,而不是:

Now I get this error message instead:

HTTP错误500.21 - 内部服务器错误

"HTTP Error 500.21 - Internal Server Error

处理程序的WebDAV有一个坏模块WebDAVModule在其模块列表

Handler "WebDAV" has a bad module "WebDAVModule" in its module list

模块:IIS Web核心
通知:ExecuteRequestHandler

Module: IIS Web Core Notification: ExecuteRequestHandler"

如果你有一个解决方案,这将使这个问题消失,我真的AP preciate它...否则,如果你是一个IIS大师,你会想这家伙不知道是什么他在做,请点我一些有用的在线阅读材料的方向。

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.

先谢谢了。

推荐答案

WebDAV模块将阻止这两个DELETE和PUT(更新)动词的IIS。你可以卸载的WebDAV(推荐)或简单地从该网站的处理程序中取出。更多详细信息可以在这里找到: http://forums.iis.net/t/1166025.aspx

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

做到这一点的方法是添加以下删除行到你的网站的web.config:

One way to do this is to add the following remove lines to your site's web.config:

<system.webServer>
    <modules>
        <remove name="WebDAVModule" />
    </modules>
    <handlers>
        <remove name="WebDAV" />
    </handlers>
</system.webServer>

这篇关于我怎样才能得到的OData DELETE工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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