MVC HttpDelete Verb 导致 405 方法不允许
当调用接受删除动词的控制器操作时,我遇到了一个现在允许异常的方法。
我认为问题是 IIS 7.0 中的 HandlerMappings 错误,当我查看时 at:
ExtensionlessUrl-ISAPI-4.0_64bit
ExtensionlessUrl-ISAPI-4.0_32bit
ExtensionlessUrl-Integrated-4.0
果然他们不接受 DELETE 动词。我将其添加到动词列表中,但仍然收到错误,所以我不知道为什么会出现这种情况。任何人都可以阐明这一点吗?
I'm encounting a method now allowed exception when calling a controller action which accepts the Delete verb.
I thought the problem was that the HandlerMappings in IIS 7.0 were wrong and when I looked
at:
ExtensionlessUrl-ISAPI-4.0_64bit
ExtensionlessUrl-ISAPI-4.0_32bit
ExtensionlessUrl-Integrated-4.0
Sure enough they didn't accept the DELETE verb. I added this to the list of Verbs but I am still getting an error so I'm at a loss as to why this is the case. Can anyone shed any light on this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现这个问题是由 WebDav 模块引起的。我从 web.config 中删除了它,这解决了问题。
希望这对其他人有帮助!
I discovered this issue was being caused by the WebDav module. I removed this from my web.config and this resolved the issue.
Hope this helps someone else!