Asp.NET的Web API - 405 - 用来访问本页面的HTTP动词是不允许的 - 如何设置处理器映射 [英] Asp.NET Web API - 405 - HTTP verb used to access this page is not allowed - how to set handler mappings

查看:213
本文介绍了Asp.NET的Web API - 405 - 用来访问本页面的HTTP动词是不允许的 - 如何设置处理器映射的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的ASP.NET Web API写的REST服务。
我想送HttpDelete的要求,但是我得到以下错误:

I wrote REST service using ASP.NET Web API. I'm trying to send HttpDelete request, however I get the following error:

405 - HTTP用于访问此页面动词是不允许的。

405 - HTTP verb used to access this page is not allowed

我觉得我接近的解决方案,我发现我应该启用IIS远程管理,去处理程序映射部分并添加DELETE动词到合适的位置......
但问题是,有一个批次列表上的不同位置的...
(某物喜欢这里: http://www.somacon.com/p126.php )。

I think I'm close to the solution, I found out that I should enable IIS remote management , go to Handler Mappings section and add DELETE verb to the appropriate position... but the problem is that there is a lots of different positions on the list... (sth like here: http://www.somacon.com/p126.php).

哪一个?
他们几个没有扩展名,例如ExtensionUrlHandler - 集成 - 4.0,我加入DELETE动词,但它仍然无法正常工作...

Which one should I edit? Few of them don't have extension, e.g. "ExtensionUrlHandler-Integrated-4.0" and I added DELETE verb to it, but it still doesn't work...

这只是在黑暗中修改一个镜头,所以我应该修改不同的位置?如果是这样,哪一个?或者,也许是有什么更多的,我应该怎么办呢?

It was just a shot in the dark to modify that one, so should I modify different position? If so, which one? Or maybe is there anything more what I should do?

相同的Web服务的工作在我的本地服务完全正常,所以我想这个问题是与远程IIS ...

The same web service work perfectly fine on my local service, so I guess the problem is with the remote IIS...

问候

推荐答案

此错误常见原因是的 WebDAV的。请务必将其卸载。

Common cause for this error is WebDAV. Make sure you uninstall it.

这篇关于Asp.NET的Web API - 405 - 用来访问本页面的HTTP动词是不允许的 - 如何设置处理器映射的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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