控制流程异常

时间:2011-09-16 11:49:47

标签: c# wcf

我在服务器应用程序中收到以下异常。可能是问题的原因以及如何调试问题。我从线程的不同点获得异常

ICC_SequenceService_SequenceReportService.NotifyEventRecived]-Exception Occured :The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it has been Aborted.-
Server 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.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)

1 个答案:

答案 0 :(得分:1)

这可能是因为您的客户端在失败时不会中止该频道并尝试关闭它。不幸的是,如果您使用的是由wsdl.exe和using语句生成的客户端代理,那么这是默认行为。