IIS 404/405 错误
我在 Windows 7 Pro 上运行 IIS7。我有一个 VS2010 解决方案,其中一些项目是使用 IIS 的 Web 服务。直到最近,所有服务都正常运行。但是,每当我添加/配置/更新服务引用或直接通过网络浏览器点击它时,我都会收到以下错误:
下载“http://localhost/myapp.Web/myservice.svc”时出错。 请求失败,HTTP 状态为 404:未找到。 元数据包含无法解析的引用:“http://localhost/myapp.Web/myservice.svc”。 远程服务器返回意外响应:(405) 不允许方法。 远程服务器返回错误:(405) 不允许方法。 如果当前解决方案中定义了该服务,请尝试构建该解决方案并再次添加服务引用。
进一步调查表明,这可能是 IIS 不允许 POST 动词或具有相同效果的其他一些配置错误(GET 请求工作正常,并且其他开发人员使用相同的代码没有问题)。尝试加载 wsdl 会返回 404.3。
我尝试过在 IIS 中重新创建站点和应用程序、更改应用程序池中的设置、重新安装 IIS 等,但都没有成功。有人对如何解决正在发生的事情有一些想法吗?
更多信息:我不确定它是否相关,但是当我尝试解决权限问题时,我大约在同一时间更改了 MSMQ 中的一些设置,但所有设置都已恢复,MSMQ 已重新安装等,问题是IIS 仍然存在。
谢谢。
I am running IIS7 on Windows 7 Pro. I have a VS2010 solution from which some projects are web services using IIS. Until recently all services worked correctly. However, whenever I add/configure/update a service reference or hit it directly via a web browser, I receive the following error:
There was an error downloading 'http://localhost/myapp.Web/myservice.svc'.
The request failed with HTTP status 404: Not Found.
Metadata contains a reference that cannot be resolved: 'http://localhost/myapp.Web/myservice.svc'.
The remote server returned an unexpected response: (405) Method Not Allowed.
The remote server returned an error: (405) Method Not Allowed.
If the service is defined in the current solution, try building the solution and adding the service reference again.
Further investigation reveals that this is likely IIS disallowing POST verbs or some other configuration error with the same effect (GET requests work fine and there are other developers using the same code with no issues). Trying to load the wsdl returns a 404.3.
I have tried recreating the sites and applications in IIS, changing their settings in the application pools, reinstalling IIS, etc without success. Does anyone have some ideas on how to fix what is going on?
More info: I'm not sure if it's relevant or not, but I changed some settings in MSMQ around the same time when I was trying to resolve permission problems, but all have been reverted, MSMQ has been reinstalled, etc and the problem with IIS remains.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现了问题。不知何故,我的 WCF 和 ASP.NET 安装已损坏。重新安装解决了问题。
I found the problem. Somehow my WCF and ASP.NET installations became corrupted. Reinstalling fixed the problem.