The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.
I am getting this error, when windows application is trying to communicate with WCF hosted as Windows Service via wsDualHttpBinding. The WCF is used to communicate with a device over serial port. Windows application used to send command frequently via WCF windows service.
Here's the stack trace:
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[][] locid, String cmd, Int32 cmdData) at GridSplitter.MainWindow.bwChkAndSendRedeploy_DoWork(Object sender, DoWorkEventArgs e) : 11/9/2012 11:05:58 AM
- I couldn't understand why the service is going into faulted state.
- Should I catch this exception and perform some patch work (if recommended)?
- Can TCP binding help me to avoid/remove this exception?