带有 IIS 的 ASP.NET Core - 不允许使用 HTTP 动词 [英] ASP.NET Core with IIS - HTTP Verb Not Allowed

查看:37
本文介绍了带有 IIS 的 ASP.NET Core - 不允许使用 HTTP 动词的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个 ASP.NET Core 2.0 网站,该网站还提供了几个用于 UI 增强目的的简单Web API 方法.

We have an ASP.NET Core 2.0 web site that also presents a couple of simple Web API methods for UI enhancement purposes.

Web API 调用在 IIS Express 本地运行时按预期工作,但是当我们部署到我们的 IIS 8.5 生产网络服务器时,我们在发出 HTTP DELETEPUT 请求时收到以下错误...

The Web API calls work as expected when running locally under IIS Express, but when we deploy to our IIS 8.5 production web server, we get the following error when making HTTP DELETE and PUT requests...

405 Method Not Allowed

经过一些网络搜索,我们发现了一些建议删除 IIS WebDAV 模块的帖子.我们在 IIS(它是我们的服务器)中禁用了它,我们也尝试了以下方法:

After some web searching, we have found several posts suggesting the removal of the IIS WebDAV module. We have disabled this in IIS (it is our server), and we have also tried the following:

  • 禁用WebDAV
  • 启用 WebDev 并设置 Allow verb filtering = False
  • 设置Hander Mappings以允许请求限制设置中的所有动词:aspNetCoreWebDAVExtensionlessUrlHandler-Integrated-4.0
  • Disabled WebDAV
  • Enabled WebDev and set Allow verb filtering = False
  • Set the Hander Mappings to allow All Verbs in the Request Restrictions settings for: aspNetCore, WebDAV and ExtensionlessUrlHandler-Integrated-4.0

以上步骤都没有解决我们的问题.

None of the above steps have resolved our problem.

任何建议/方向将不胜感激.

Any advice/direction would be much appreciated.

推荐答案

虽然删除 WebDAV 可能会解决您的问题,但您可能想知道(就像我一样),WebDAV 是什么以及它的用途是什么?

Whilst removing WebDAV may solve your issue, you may be wondering (like I was), what is WebDAV and what is it used for?

我发现这个页面有助于解释它:

I found this page which helps explain it:

https://www.cloudwards.net/what-is-webdav/

这篇关于带有 IIS 的 ASP.NET Core - 不允许使用 HTTP 动词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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