开发者

WCF service consuming another WCF service hosted in IIS7

We are having some problems deploying our WCF services into IIS7. We have two services: DataAccess and BusinessLogic (example names). Clients connect开发者_高级运维 to the BusinessLogic which then connects to the DataAccess. The WCF test client allows us to consume the DataAccess service without errors. However, when we try to call the same function from the BusinessLogic service, the call times out and returns the following error:

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)

When run locally using Visual Studio 2008, everything works without a hitch. It is only when we deploy to IIS that this problem occurs.

On the server, we reconfigured all the app configs and made sure the addresses were accessible. We can view all the WSDLs via the browser. We also enabled tracing on the server and using the SvcTraceViewer we got the following error:

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

Does anyone have any experience publish WCF services that call another WCF service in an IIS7 environment? Any help would be greatly appreciated.


Turns out it was IIS permissions.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜