You may receive a "System.Runtime.InteropServices.COMException" exception error when you try to send a large message by using the Large Message to MSMQT sample application in BizTalk Server 2004 (897294)
The information in this article applies to:
- Microsoft BizTalk Server 2004 Enterprise Edition
- Microsoft BizTalk Server 2004 Standard Edition
- Microsoft BizTalk Server 2004 Partner Edition
- Microsoft BizTalk Server 2004 Developer Edition
SYMPTOMSIn Microsoft BizTalk Server 2004, when you try to send a large message by using the Large Message to MSMQT sample application, you may intermittently receive the following exception error message: System.Runtime.InteropServices.COMException (0xC00E0007): Exception from HRESULT: 0xC00E0007.
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode, IntPtr errorInfo)
at LargeMessages.LargeMessageQueue.Send(LargeMessage message)
Typically this problem occurs when the server is under a heavy load. Note The sample application uses the MQSendLargeMessage API implemented by the BizTalk Message Queuing Large Message Extension (Mqrtlarge.dll). CAUSEThis problem occurs because the queue is closed and then the queue is accessed again. Therefore, the second access throws the invalid handle error.
RESOLUTIONTo resolve this problem, you must make two changes in the Queue.h header file. To do this, follow these steps: - Start Microsoft Visual Studio .NET.
- Open the LargeMessages.sln solution.
- In Solution Explorer, right-click Queue.h, and then click Open.
- Locate the following code on line 48:
MQCloseQueue(queueHandle); Change this source code to the following code:MQCloseQueue(queueHandle);
queueHandle=NULL; - Locate the following code on line 195:
MQCloseQueue(unmanagedQueueData->queueHandle); Change this source code to the following code:MQCloseQueueunmanagedQueueData->queueHandle);
unmanagedQueueData->queueHandle=NULL;
- On the Build menu, click Build Solution to rebuild the solution.
Modification Type: | Major | Last Reviewed: | 5/3/2005 |
---|
Keywords: | kbBTSMessaging kbtshoot kbprb KB897294 kbAudDeveloper kbAudITPRO |
---|
|