Search code examples
c#msmq

Receiving MSMQ messages on Windows Server 2016


I set up a queue on a Windows Server 2016 machine, but I cannot for the life of me figure out how to receive messages from it remotely.

MessageQueue.Receive() will throw

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

I then configured a queue in the same way on another box with Windows Server 2008 R2, and that queue I could receive from just fine.

So here are some details about my setup, and what I've tried so far.

  • I'm using a format name like FORMATNAME:Direct=OS:machine-name\private$\queue-name
  • Everyone and Anonymous Logon are granted full rights for the queue
  • The firewall on the server is completely disabled
  • I unchecked "Disable un-authenticated RPC calls" in the MSMQ security settings

What else should I check? How can I get to the bottom of this?


Solution

  • I finally got it to work by disabling Secured Remote Read:

    To modify this default behavior and allow the Message Queuing server to accept requests from domain computers that do not establish an encrypted channel, add the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters\Security\NewRemoteReadServerAllowNoneSecurityClient registry entry (a DWORD) and set it to 1.

    Source: https://msdn.microsoft.com/en-us/library/ms699854.aspx