Tags: appreciate, beginpeek, calling, endpeek, guys, instantiation, messagequeue, messagequeueerrorcode, messagequeueexception, net, sharp, throwing, throws

EndPeek throwing MessageQueueException with MessageQueueErrorCode set to -1073741536

On .Net » .Net C# (C sharp)

1,078 words with 0 Comments; publish: Mon, 02 Jun 2008 18:20:00 GMT; (10062.50, « »)

Hi,

Would appreciate any help you guys have to offer. On calling beginPeek on

instantiation of a MessageQueue, EndPeek throws a MessageQueueException. If

the queue exists already, the exception is not thrown, but when I just

create the queue and call BeginPeek, the exception is thrown on calling

EndPeek. The MessageQueueErrorCode of the exception has the

value -1073741536. I've tried matching this up with a defined

MessageQueueErrorCode, but there's no match. Also, the message string of the

exception is blank. Any ideas?

//begin code

if(!MessageQueue.Exists(_messageQueuePath)) {

MessageQueue tempMQ = MessageQueue.Create(_messageQueuePath, true);

tempMQ.SetPermissions(_windowsSecurityAccount,

MessageQueueAccessRights.FullControl);

}

_myQueue = new MessageQueue(_messageQueuePath);

_myQueue.Formatter = new BinaryMessageFormatter();

_myQueue.PeekCompleted += new

PeekCompletedEventHandler(m_myQueue_PeekCompleted);

_myQueue.BeginPeek();

//end code

Thank you.

Craig

All Comments

Leave a comment...

  • 0 Comments