WCF服务使用IIS7中托管的另一个WCF服务

时间:2010-03-01 22:39:01

标签: wcf iis-7

我们在将我们的WCF服务部署到IIS7时遇到了一些问题。 我们有两个服务:DataAccess和BusinessLogic(示例名称)。 客户端连接到BusinessLogic,然后连接到DataAccess。 WCF测试客户端允许我们无错误地使用DataAccess服务。 但是,当我们尝试从BusinessLogic服务调用相同的函数时,调用超时并返回以下错误:

An error occurred while receiving the HTTP response to http://10.10.200.58/CRM/CS.ITS.CSC.CRM.CRMService.svc/basic. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.

Server stack trace: 
   at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
   at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
   at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
   at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at ICRMService.GetAccount(Int32 AccountId)
   at CRMServiceClient.GetAccount(Int32 AccountId)

使用Visual Studio 2008在本地运行时,一切都顺利进行。只有当我们部署到IIS时才会出现此问题。

在服务器上,我们重新配置了所有应用配置并确保地址可访问。我们可以通过浏览器查看所有WSDL。我们还在服务器上启用了跟踪并使用SvcTraceViewer,我们收到以下错误:

Failed to lookup a channel to receive an incoming message. Either the endpoint or the SOAP action was not found.

有没有人有经验发布在IIS7环境中调用另一个WCF服务的WCF服务?任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:-3)

原来是IIS权限。