Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access to Message Queuing system is denied

Tags:

msmq

I am trying to access queue message from my host, while trying to get message i am getting "Access to Message Queuing system is denied." message. Don't know how to solve this issue. I am using Windows 7 as client system and server is Windows 2008 R2 Server

like image 467
pravakar Avatar asked Mar 26 '12 15:03

pravakar


People also ask

How to restart message queuing service in Windows?

Control Panel->Administration Tools->Computer Management. In Computer Management->Services and Applications->Message Queuing->Private Queues. Set ANONYMOUS LOGON to Full Control. Restart Message Queuing service.

Why can't I read a message from a remote queue?

If you are trying to read a message from a remote queue then permissions is the main culprit, as kprobst mentioned. Thanks to this post, I've been able to remove the "Access Denied" problem: https://codifying.wordpress.com/2012/04/16/msmq-solving-access-denied-errors-for-private-queues/

How do I set up a message queue on my computer?

Under computer management (right click "Computer" from the start menu and choose "Manage"), go to the "Message Queuing" section and right-click on the queue name you want and choose "Properties" --> click the "Security" tab and you can manage the permissions there.

How to fix MSMQ service is not working in IIS?

I fixed this by giving NETWORK SERVICE full control: Computer Management > Services and Applications > Message Queuing > Private Qeues > Right click queue > Properties > Security Restart MSMQ service and IIS: Control Panel->Administration Tools->Computer Management. In Computer Management->Services and Applications->Message Queuing->Private Queues.


2 Answers

I ran into the same issue trying to write to the MSMQ through ASP.NET (Windows 7). I added "Receive Message" "Peek Message" and "Send Message" permissions and it works correctly now. If you're running this through ASP.NET, then you're probably under the IIS_IUSRS account.

like image 123
Glade Mellor Avatar answered Sep 28 '22 01:09

Glade Mellor


In my case, the MSMQ queues were owned by my own Windows user-account (local admin), because they had been created from running a console app from Visual Studio in administrator mode.

My web-app runs as NETWORK SERVICE, which spawned the

Access to Message Queuing system is denied

error.

I fixed this by giving NETWORK SERVICE full control:

Computer Management > Services and Applications > Message Queuing > Private Qeues > Right click queue > Properties > Security

Restart MSMQ service and IIS:

NET STOP MSMQ NET START MSMQ IISRESET 
like image 27
Frederik Struck-Schøning Avatar answered Sep 27 '22 23:09

Frederik Struck-Schøning