PC Review


Reply
Thread Tools Rate Thread

EndPeek throwing MessageQueueException

 
 
Craig
Guest
Posts: n/a
 
      13th Sep 2005
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. 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


 
Reply With Quote
 
 
 
 
=?Utf-8?B?RGFuIEtlbGxleQ==?=
Guest
Posts: n/a
 
      13th Sep 2005
It is impossible to say without knowing more details on the exception. My
suggestion would be, when you catch the MessageQueueException, take a look at
the Message and MessageQueueErrorCode properties.

These should give you an idea of what is going wrong.

HTH
Dan

"Craig" wrote:

> 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. 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
>
>
>

 
Reply With Quote
 
 
 
 
Craig
Guest
Posts: n/a
 
      14th Sep 2005
Hi Dan.
Thank you for your reply, I appreciate your assistance. The error code for
the MessageQueueException is -1073741536 and the message is blank. I tried
to match up which MessageQueueErrorCode it is, but looks as though there's
no match. Do you have any idea what could be wrong?

--begin
[ErrCode:-1073741536] ''
System.Messaging.MessageQueueException
at System.Messaging.AsynchronousRequest.End()
at System.Messaging.MessageQueue.EndPeek(IAsyncResult asyncResult)
--end

Thanks and best regards.
Craig


"Dan Kelley" <(E-Mail Removed)> wrote in message
news(E-Mail Removed)...
> It is impossible to say without knowing more details on the exception. My
> suggestion would be, when you catch the MessageQueueException, take a look
> at
> the Message and MessageQueueErrorCode properties.
>
> These should give you an idea of what is going wrong.
>
> HTH
> Dan
>
> "Craig" wrote:
>
>> 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. 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
>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
EndPeek throwing MessageQueueException with MessageQueueErrorCode set to -1073741536 Craig Microsoft C# .NET 0 14th Sep 2005 02:50 PM
Direct 3D throwing a fit =?Utf-8?B?WHNhdGhyYQ==?= Windows XP Games 3 1st Nov 2004 06:19 PM
Re: MessageQueueException in ReadHandle =?Utf-8?B?QW5kcmV3IEhheWVz?= Microsoft Windows 2000 Active Directory 14 22nd Mar 2004 09:44 AM
MessageQueueException in ReadHandle =?Utf-8?B?QW5kcmV3IEhheWVz?= Microsoft C# .NET 1 26th Feb 2004 09:07 PM
An unhandled exception of type 'System.Messaging.MessageQueueException' occurred Tony Hamill Microsoft C# .NET 2 29th Oct 2003 10:20 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:03 PM.