Wednesday, September 5, 2018

Question about an exception thrown while getting Messages from MSMQ?

I am using MSMQ for a general TCP Listener. The queue works fine, but sometimes, while I am parsing through the queue and getting messages out of it, I get the following exception:

Exception in server System.Messaging.MessageQueueException (0x80004005) at System.Messaging.MessageQueue.SetPermissions(AccessControlList dacl) at System.Messaging.MessageQueue.SetPermissions(String user, MessageQueueAccessRights rights, AccessControlEntryType entryType) at M2MParser.StartParser.Server(Boolean flag) in StartParser.cs:line 49 

Line 49 has the following line of code

mqueue.SetPermissions(Environment.UserName, MessageQueueAccessRights.FullControl, AccessControlEntryType.Set); 

I have searched a lot for a solution to this exception but to no avail. If I restart the program, it starts working fine again, no exceptions.

Any help on this exception or why it occurs is appreciated.

Question about an exception thrown while getting Messages from MSMQ? Click here
  • Blogger Comment
  • Facebook Comment

0 comments:

Post a Comment

The webdev Team