IIS 404/405错误 [英] IIS 404/405 errors

查看:305
本文介绍了IIS 404/405错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Windows 7 Pro上运行IIS7.我有一个VS2010解决方案,其中一些项目是使用IIS的Web服务.直到最近,所有服务都可以正常工作.但是,每当我添加/配置/更新服务引用或直接通过Web浏览器访问它时,都会收到以下错误消息:

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:

下载"http://localhost/myapp.Web/myservice.svc"时出错. 请求失败,HTTP状态为404:找不到. 元数据包含无法解析的引用:"http://localhost/myapp.Web/myservice.svc". 远程服务器返回了意外的响应:(405)不允许使用方法. 远程服务器返回错误:(405)不允许使用方法. 如果服务是在当前解决方案中定义的,请尝试构建解决方案并再次添加服务引用.

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.

进一步的调查显示,这很可能是IIS禁止POST动词或其他具有相同效果的配置错误(GET请求工作正常,并且其他开发人员使用相同的代码也没有问题).尝试加载wsdl会返回404.3.

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.

我尝试在IIS中重新创建站点和应用程序,更改它们在应用程序池中的设置,重新安装IIS等,但均未成功.有人对如何解决发生的事情有一些想法吗?

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?

更多信息:我不确定它是否相关,但是在尝试解决权限问题的大约同一时间,我更改了MSMQ中的某些设置,但所有设置已还原,MSMQ已重新安装,等等. IIS的问题仍然存在.

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.

谢谢.

推荐答案

我发现了问题.我的WCF和ASP.NET安装不知何故损坏了.重新安装解决了该问题.

I found the problem. Somehow my WCF and ASP.NET installations became corrupted. Reinstalling fixed the problem.

这篇关于IIS 404/405错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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