7

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
Taryn
  • 242,637
  • 56
  • 362
  • 405
Don
  • 101
  • 1
  • 1
  • 5
  • Did you try this solution: http://stackoverflow.com/questions/3731627/win-service-getting-permission-denied-to-message-queuing – Nix Jun 28 '11 at 19:17
  • 1
    Is this an application running on the same machine as the queue? Also, an easy test of queue permissions is to temporarily give Full Control to Everyone+AnonymousLogon. If that works then the queue permissions are wrong. – John Breakwell Jun 28 '11 at 22:07
  • I got around this problem by uninstalling the queue feature and re adding it in windows 2008. – Don Jun 30 '11 at 18:55

4 Answers4

4

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

Anders Zommarin
  • 7,094
  • 2
  • 25
  • 24
2

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.

Shlomi
  • 157
  • 1
  • 1
  • 1
    For me giving permission to 'Everyone' was not enough. I added permission to 'Anonymous Logon' to actually allow the service to have anyone run it. – rageit Jun 11 '12 at 13:40
0

Also added permission to 'Anonymous Logon' and it worked.

0

I also use 2008 R2, Yes, the actually queue name being created is lower-cased, but in my code, access it using the Upper case works well.

zhaorufei
  • 2,045
  • 19
  • 18