0

I have private queue created with Anonymous, Everyone, NetworkService full control on a server which is in workgroup mode. I can send a message using .net stub without any issue where as it throws exception while receiving the message. I tried to read the message using

Message.Receive() and Message.ReceiveByID() both throws exception. I tried to add the registry key as told in below link but it did not work

https://blogs.msdn.microsoft.com/johnbreakwell/2007/01/15/msmq-3-0-too-secure-for-you/

MessageQueue messageQueue = new MessageQueue(queueFormatPath); var message = messageQueue.Receive();

MyMessageQueue.ReceiveById(e.Message.Id);

exception: enter image description here

user3067170
  • 193
  • 4
  • 14

1 Answers1

0

You're performing RPC communication so there are several areas to check, in addition to the one you've already found.

https://blogs.msdn.microsoft.com/johnbreakwell/2010/03/24/understanding-how-msmq-security-blocks-rpc-traffic/

https://blogs.msdn.microsoft.com/johnbreakwell/2009/05/17/failing-to-read-from-remote-msmq-queues/

https://blogs.msdn.microsoft.com/johnbreakwell/2008/07/10/getting-msmq-messages-out-of-windows-server-2008-remotely/

John Breakwell
  • 4,667
  • 20
  • 25
  • Yes i have checked these, all the ports are open and in my case the firewall is turned off, do you see anything else which is causing the issue – user3067170 Jul 17 '19 at 17:50
  • What's the exception? – John Breakwell Jul 19 '19 at 11:10
  • i was trying to change the path to http or https and test it but receiving message is throwing exception while receive. msmq over http works? – user3067170 Jul 26 '19 at 15:25
  • MSMQ-over-HTTP(S) is send only; no receive. – John Breakwell Jul 27 '19 at 23:13
  • Did you add "Un-authenticated RPC calls disabled"? – John Breakwell Jul 27 '19 at 23:23
  • yes thats done too. any other thing in your mind? just to add if both machines(msmq machine and receiver) are on same lan there is no issue. the issue arise only if the receiver is on other side of firewall. also note also ports are open on the firewall which are mentioned by Microsoft for msmq – user3067170 Jul 29 '19 at 17:51
  • "the issue arise only if the receiver is on other side of firewall." NOW you tell me :-) So the firewall is blocking RPC. You'll want to ask the firewall admins to tell you what the firewall is doing when the MSMQ RPC calls are being made. – John Breakwell Jul 30 '19 at 15:29
  • "ports are open on the firewall which are mentioned by Microsoft for MSMQ" - which ports? Which reference document? – John Breakwell Jul 30 '19 at 15:30
  • https://blogs.msdn.microsoft.com/johnbreakwell/2008/04/29/clear-the-way-msmq-coming-through/ "RPC is used for this operation which requires access through TCP ports 135, 2103 and 2105. First the client makes an RPC call over port 135 to determine which ports MSMQ is listening on for RPC-based remote reads. Then the client makes the RPC call to ports 2103/2105 to read the message." – John Breakwell Jul 30 '19 at 15:31
  • 1
    ok we figured it. it was due to the static NAT ip. once it was removed all worked fine – user3067170 Jul 31 '19 at 15:03