Last post Jul 15, 2015 11:44 AM by billcrawley
Jul 15, 2015 07:53 AM|billcrawley|LINK
I have installed MSMQ on Server 'A' and created a public queue. I've now moved onto my dev PC which isn't Server 'A' I have created a test project and made a reference in my class library to System.Messaging namespace. When I try to send to the Queue, I
receive a message that MSMQ is not installed on this computer. I didn't think I needed to install MSMQ specifically on my dev box to write to a queue on another server provided I have given the correct queueName
public void SetUp()
fullQueue = string.Concat("FormatName:DIRECT=OS:", serverName, "\\Public$\\", queueName);
public void SimpleWriteToQueueTest()
using (var transaction = new MessageQueueTransaction())
using (var queue = new MessageQueue(@fullQueue))
var message = new Message("Hello Bill");
Jul 15, 2015 09:15 AM|billcrawley|LINK
I have installed msmq locally. Now when I run my test I receive 'Format name is invalid', 'Illegal formatted name'
Jul 15, 2015 09:33 AM|billcrawley|LINK
I have deleted the public queue in MSMQ and made it private. Consequently, I have changed the fullQueue variable to no poiint to private$. This has now removed the error and on the surface no errors are produced.
When I look in the queue on the server there are no messages in the queue. When I look on my local MSMQ installation I can see that it has created an entry in the outgoing queuse for the given queuename, but I still cannot see the message. I understand that
its probably sitting locally waiting to go because I haven't yet got the annonymous logon configured on the MSMQ Server, but never the less, I'd expect to see my message in the queue.
Jul 15, 2015 11:44 AM|billcrawley|LINK
Solved. Needed to tell the message it was in a transaction