System.Messaging.MessageQueueException-外部组件抛出异常

Bha*_*thi 5 c# queue msmq message-queue msmq-transaction

我通过Windows服务运行.exe,它从私有队列中读取消息.服务一切都很好而且稳定,但有时服务停止(它实际上没有停止,但它没有处理任何东西.服务状态仍然是"已启动",我需要手动重启它).

这个经常不会出现但是分析.exe文件的内存转储,我发现在异常下遇到了这么多线程.

异常对象:0000000001436120异常类型:System.Messaging.MessageQueueException消息:外部组件引发了异常.

System.Messaging.MessageQueueException- External component has thrown an exception
System.Messaging.MessageQueue.ReceiveCurrent(System.TimeSpan, Int32, System.Messaging.Interop.CursorHandle, System.Messaging.MessagePropertyFilter, System.Messaging.MessageQueueTransaction, System.Messaging.MessageQueueTransactionType) 
System.Messaging.MessageQueue.Peek(System.TimeSpan)
Run Code Online (Sandbox Code Playgroud)

知道服务遇到这个异常的原因吗?提前致谢