我收到错误 System.ServiceModel.Channels错误。重现此错误的一个原因是服务器上是否有未处理的异常。
整个代码都包含在 try catch 中,因此不会发生这种情况。我的问题是还有什么其他的事情可以触发这个异常。我们在一个环境中超越了例外。
下面是我的堆栈跟踪
System.ServiceModel.Channels.CommunicationObject.ThrowIfAborted() System.ServiceModel.Channels.InputQueueChannel
1.EndDequeue(IAsyncResult result, TDisposable& item) System.ServiceModel.Channels.ReplyChannel.EndTryReceiveRequest(IAsyncResult result, RequestContext& context) System.ServiceModel.Dispatcher.ReplyChannelBinder.EndTryReceive(IAsyncResult result, RequestContext& requestContext) System.ServiceModel.Dispatcher.ErrorHandlingReceiver.EndTryReceive(IAsyncResult result, RequestContext& requestContext) System.ServiceModel.Dispatcher.ChannelHandler.EndTryReceive(IAsyncResult result, RequestContext& requestContext) System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(IAsyncResult result) System.ServiceModel.Dispatcher.ChannelHandler.OnAsyncReceiveComplete(IAsyncResult result) System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result) System.Runtime.AsyncResult.Complete(Boolean completedSynchronously) System.Runtime.InputQueue
1.AsyncQueueReader.Set(Item item) System.Runtime.InputQueue1.Shutdown(Func
1 pendingExceptionGenerator) System.ServiceModel.Channels.InputQueueChannel`1.OnClosing() System.ServiceModel.Channels.CommunicationObject.Abort() System.ServiceModel.Dispatcher.ListenerHandler.AbortChannels() System.ServiceModel.Dispatcher.ListenerHandler.OnAbort() 系统.ServiceModel.Channels.CommunicationObject.Abort() System.ServiceModel.Dispatcher.ChannelDispatcher.OnAbort() System.ServiceModel.Channels.CommunicationObject.Abort() System.ServiceModel.ServiceHostBase.OnServiceHostFaulted(Object sender, EventArgs args) System.ServiceModel。 Channels.CommunicationObject.OnFaulted() System.ServiceModel.Channels.CommunicationObject.Fault() System.ServiceModel.ServiceHostBase.OnChannelDispatcherFaulted(Object sender, EventArgs e) System.ServiceModel.Channels.CommunicationObject.OnFaulted() System.ServiceModel.Channels.CommunicationObject .Fault() System.ServiceModel.Dispatcher.ChannelDispatcher.OnListenerFaulted(Object sender, EventArgs e) System.ServiceModel.Channels.CommunicationObject.OnFaulted() System.ServiceModel.Channels.CommunicationObject.Fault() System.ServiceModel.Channels.Msmq4PoisonHandler.InternalFinalDisposition (MsmqQueue disposeFromQueue, MsmqMessageProperty messageProperty) System.ServiceModel.Channels.Msmq4PoisonHandler.FinalDisposition(MsmqMessageProperty messageProperty) System.ServiceModel.Channels.MsmqDecodeHelper.DecodeTransportDatagram(MsmqInputChannelListener listener, MsmqReceiveHelper receiver, MsmqInputMessage msmqMessage, MsmqMessageProperty messagePropertyInputChannels) System. DecodeMsmqMessage(MsmqInputMessage msmqMessage, MsmqMessageProperty messageProperty) System.ServiceModel.Channels.MsmqInputChannelBase。TryReceive(TimeSpan 超时,消息和消息) System.ServiceModel.Dispatcher.InputChannelBinder.TryReceive(TimeSpan 超时,RequestContext& requestContext) System.ServiceModel.Dispatcher.ErrorHandlingReceiver.TryReceive(TimeSpan 超时,RequestContext& requestContext) System.ServiceModel.Dispatcher.ChannelHandler.TryReceive( TimeSpan 超时,RequestContext& requestContext) System.ServiceModel.Dispatcher.ChannelHandler.SyncMessagePump() System.ServiceModel.Dispatcher.ChannelHandler.OnStartSyncMessagePump(Object state) System.Runtime.IOThreadScheduler.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped) System.Runtime.Fx.IOCompletionThunk.UnhandledExceptionFrame(UInt32 错误,UInt32 bytesRead,NativeOverlapped* nativeOverlapped) System.Threading._IOCompletionCallback。PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)