I'm trying to debug some code that uses the class 'MessageQueue'
The program fails on this line:
MSMQ_.PeekCompleted += new PeekCompletedEventHandler(MSMQ__PeekCompleted);
...and the method looks like this:
protected void MSMQ__PeekCompleted(object sender, PeekCompletedEventArgs e)
((MessageQueue)sender).EndPeek(e.AsyncResult); // ********* LINE 114 ************
Message m = ((MessageQueue)sender).Receive();
Hoping to get help understanding what is being done so I can understand why the procedure times out. The error message I get is:
System.Messaging.MessageQueueException was unhandled by user code
Message="Timeout for the requested operation has expired."
at ProjectObjects.Module1.CCMSMQ.MSMQ__PeekCompleted(Object sender, PeekCompletedEventArgs e) in C:\Projects\ProjectObjects\Module1\CCMSMQ.cs:line 114
at System.Messaging.MessageQueue.AsynchronousRequest.RaiseCompletionEvent(Int32 result, NativeOverlapped* overlappedPointer)