The communication object,System.ServiceModel.Channels.ServiceChannel,
cannot be used for communication because it is in the Faulted state.
当Windows应用程序尝试通过wsDualHttpBinding与作为Windows服务托管的WCF进行通信时,我收到此错误. WCF用于通过串行端口与设备通信.用于经常通过WCF Windows服务发送命令的Windows应用程序.
这是堆栈跟踪:
stack trace: at
System.ServiceModel.Channels.CommunicationObject.ThrowIfDisposedOrNotOpen()
at System.ServiceModel.Channels.ServiceChannel.Call(String action,
Boolean oneway,ProxyOperationRuntime operation,Object[] ins,
Object[] outs,TimeSpan timeout) 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
GridSplitter.CommandServiceReference.ICommandService.SendToMultipleChannel(String[]
channel,Int32[][] locid,String cmd,Int32 cmdData) at
GridSplitter.CommandServiceReference.CommandServiceClient.SendToMultipleChannel(String[]
channel,Int32 cmdData) at
GridSplitter.MainWindow.bwChkAndSendRedeploy_DoWork(Object sender,
DoWorkEventArgs e) : 11/9/2012 11:05:58 AM
>我无法理解为什么服务会进入故障状态.
>我是否应该捕获此异常并执行一些补丁工作(如果推荐)?
> TCP绑定可以帮助我避免/删除此异常吗?