Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MessageQueueException (0x80004005): Access to Message Queuing system is denied

I have an exsiting application that works fine on a windows 2003 server. I having been moving it to windows 2008r2 and when the application trys to access the queue it gets the below error? The Indentity user of my app pool has full control of my message queue. Does anyone have any ideas on how to fix this. I believe this to be server config issue.

[MessageQueueException (0x80004005): Access to Message Queuing system is denied.]
   System.Messaging.MQCacheableInfo.get_ReadHandle() +221
   System.Messaging.MessageEnumerator.get_Handle() +70
   System.Messaging.MessageEnumerator.MoveNext(TimeSpan timeout) +93
   System.Messaging.MessageQueue.GetAllMessages() +58
   NServiceBus.Unicast.Subscriptions.Msmq.MsmqSubscriptionStorage.Init(IList`1 messageTypes) +124
   NServiceBus.Unicast.UnicastBus.Start(Action`1[] startupActions) +674
   Connector.Service.InitBus() +201
   Connector.OutgoingService..cctor() +9
like image 400
Don Avatar asked Jun 28 '11 19:06

Don


People also ask

How do I set permissions in msmq?

Stop the MSMQ Service (Services -> Message Queuing) Open the C:\WINDOWS\system32\msmq\storage\lqs folder. Find the config file in this folder that describes a queue that has "good" security permissions. You will need to open each file in turn with a text editor to determine which queue it relates to.

How do I delete a private queue in msmq?

In computer management, go to the security properties of the queue, take ownership through the Advanced button, and set permissions to what you want. Find the queue config file in the system32\msmq\storage\lqs directory and delete the file; the queue name will be inside the file you want.

What is queuing msmq activation?

Msmq Listener Adapter service (NetMsmqActivator) activates queued applications based on messages in the queue. The client sends purchase orders to the service from within the scope of a transaction. The service receives the orders in a transaction and processes them.


2 Answers

I just had the same experience when moving from Win 2003 to Win 2008 R2 - and it turned out that 2008 R2 create queues with lowercase letters when I use the .NET APIs to create the queue. Later when the application tries to access the queue it cannot access them (giving the error you state) using uppercase letter. Using lowercase solves the problem.

/AZ

like image 173
Anders Zommarin Avatar answered Oct 19 '22 09:10

Anders Zommarin


I also got the following:

System.Messaging.MessageQueueException (0x80004005): Access to Message Queuing system is denied. Being generated from: NServiceBus.Utils.MsmqUtilities.

Giving 'Everyone' permissions on the 'error' queue solved the problem.

like image 2
Shlomi Avatar answered Oct 19 '22 08:10

Shlomi