IIS 7、MVC2 Web 服务、PUT 上的 HTTP 405 错误
这是一个与 IIS 7.5、Web 服务和 HTTP 405 类似的问题错误但有点不同。我没有使用 WCF Web 服务,而是使用了 MVC2 Web 服务,当在请求中使用 PUT 时,该服务会返回 405 错误。而且,就我而言,POST 工作得很好。
我猜我需要添加或调整 IIS 7 处理程序映射才能使 PUT 正常工作,但我的托管提供商并没有提供太多帮助。有人遇到过这个问题并且知道如何让 PUT 在 IIS 7 中运行的 MVC2 Web 服务中工作吗?如果这个问题已经得到解答,我很抱歉,我已经搜索了一整天,但没有找到神奇的答案。
任何帮助将不胜感激...
This is a similar question as IIS 7.5, Web Service and HTTP 405 error but a little different. Instead of a WCF web service, I've got an MVC2 web service that returns a 405 error when a PUT is used in the request. And, in my case, POST works just fine.
I'm guessing I need to either add or tweak an IIS 7 Handler Mapping to get PUT to work but my hosting provider hasn't been much help. Anyone out there run into this and know how to get PUTs to work in an MVC2 web service running in IIS 7? My apologies if this has already been answered, I've been searching all day and haven't found the magical answer.
Any help would be greatly appreciated...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我们遇到了同样的问题,解决方案是在 Web.config 文件中添加一个元素:
We had the same problem, and the solution was adding an element into section in the Web.config file:
查看https://serverfault.com/ questions/93424/how-to-enable-put-and-delete-in-iis7/93428#93428
dario -索莱拉:
Have a look at https://serverfault.com/questions/93424/how-to-enable-put-and-delete-in-iis7/93428#93428
dario-solera: