I'm now into full swing looking at MSMQ 4.0 on Windows Server 2008 using Virtual Server. I haven't got round to installing 2008 on my 64-bit laptop and desktop yet but maybe in the summer sometime when customers are on vacation I'll have the time.

Sending messages works fine but receiving them fails (0xC00E0069 Remote Machine Not Available). After a little while I realise that the security is tighter than I'm used to so the Windows Firewall must be blocking me. I check the Exceptions list for Windows Firewall (Control Panel) and Message Queuing is there.

This doesn't provide me with much detail, though, so I have a look at Server Manager where I can see two entries.

Checking the properties, I see that these are:

  • TCP - all ports - for %systemroot%\system32\mqsvc.exe
  • UDP - all ports - for %systemroot%\system32\mqsvc.exe

so basically the firewall will allow any incoming traffic to the ports that MSMQ is listening on. This is OK for sending messages to the server but not for receiving them as that uses RPC and the End Point Mapper (EPM). Luckily, in the list of Inbound Rules is "Remote Administration (RPC-EPMAP)". Enabling this exception allows my application to query the EPM and so determine the port MSMQ is listening on for remote receive requests. There's no need to add any other ports as the first two exceptions have those covered already. 
 
 
Now all my messages can be pulled out of their queues remotely.
 
For more information on ports required by MSMQ, check here.