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

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

问题描述

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

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 生产Web服务器时,我们在发出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
  • 请求限制设置中为aspNetCoreWebDAVExtensionlessUrlHandler-Integrated-4.0设置 Hander映射以允许所有动词.
  • 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天全站免登陆