My DEV server is Windows 2008 R2 has MSMQ installed. My local development machine is Windows XP, also has MSMQ installed. Obviously they are 2 different MSMQ versions.
In my code I have something like
MessageQueue queue = new MessageQueue(@"formatname:DIRECT=OS:MyDevServer\Private$\MyQueue", QueueAccessMode.Send);
Message message = new Message(value, new BinaryMessageFormatter());
queue.Send(message, MessageQueueTransactionType.Single);
queue.Close();
return message.Id;
to send messages. My intention is to make the messages appear in my DEV server's private queue.
I have this queue created on DEV server, with permissions of
- Everyone - Get Permissions, Send Message
- My domain account to create the queue - I can do everything
- MyDevServer$ - Get Properties, Get Permissions, Send Message
- Anonymous Logon - Send Message
I can run the code locally without exception, and I can also obtain the message Id. On my local Windows XP's MSMQ I can see I have Outgoing Queue
-> DIRECT=OS:MyDevServer\Private$\MyQueue
-> Queue Messages
. The new message appears in this queue. After a while the message is gone. BUT I cannot see it anywhere in my DEV server's queue.
UPDATE: I found SO post "MSMQ on Win2008 R2 won’t receive messages from older clients" which solved my problem, the code above is correct, but the target host was blocking traffic.