【发布时间】:2014-01-07 23:46:08
【问题描述】:
以前 MVC 4 应用程序托管在 Windows 2003 服务器 asp.net 4.0.30319 中
WCF 服务也托管在那里。
匿名访问与 IUSR_ 帐户一起检查
以及集成 Windows 身份验证复选框。
现在将网站和服务都移至 Windows 2012 Server (IIS 8) 点击 Web 服务可以正常工作:
http://exampleservicetest.test.com/Service.svc?wsdl
问题:拉起调用该服务的网站会返回下面的 405 错误。篡改每个谷歌的设置并不能解决问题....
错误。
An error occurred while processing your request.
ProtocolException
System.ServiceModel.ProtocolException: The remote server returned an unexpected response: (405) Method Not Allowed. ---> System.Net.WebException: The remote server returned an error: (405) Method Not Allowed.
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
--- End of inner exception stack trace ---
【问题讨论】:
-
你检查过应用程序池.net框架吗?
-
web 应用和服务都在自己的应用池中运行,都是 Integrated Pipeline 和 v4.0
-
如果站点在同一个 IIS 服务器上,使用最新版本的 IIS 是否可能需要 web.config 中的跨域策略? stackoverflow.com/questions/5686059/…
标签: asp.net-mvc wcf windows-server-2012 iis-8