1

在 Windows Server 2003 上,我们使用以下批处理命令每周备份一次 Windows 消息队列中的消息 (http://technet.microsoft.com/en-us/library/cc773213%28v=ws.10%29.aspx) :

cd "C:\backup"
echo y | del *.* /Q /s
echo y | mqbkup -b C:\backup

我们有一个 C# ASP.NET 3.5 Web 应用程序在与此消息队列交互的同一台机器上运行。

备份运行后,当我们尝试从 Web 应用程序访问消息队列时,Web 应用程序。抛出以下错误(如果应用程序被重建,它会消失,如预期的那样)。我如何解决它?请帮忙。谢谢。

*Server Error in '/' Application.

The Queue manager service has been restarted. The queue handle is stale and should be closed.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Messaging.MessageQueueException: The Queue manager service has been restarted. The queue handle is stale and should be closed.

Source Error: Line 107: Message[] msgs = Global.getMessageQueue()[i].GetAllMessages();

Stack Trace: 
[MessageQueueException (0x80004005): The Queue manager service has been restarted. The queue handle is stale and should be closed.]
       System.Messaging.MessageEnumerator.get_Handle() +168
       System.Messaging.MessageEnumerator.MoveNext(TimeSpan timeout) +103
       System.Messaging.MessageEnumerator.MoveNext() +47
       System.Messaging.MessageQueue.GetAllMessages() +41
       engine.resultData.Page_Load(Object sender, EventArgs e) in C:\retentionSys_08\master\resultData.aspx.cs:107
       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
       System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
       System.Web.UI.Control.OnLoad(EventArgs e) +99
       System.Web.UI.Control.LoadRecursive() +50
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.4028*
4

0 回答 0