Pierre Greborio.NET

Talking about .NET world

February 2005 - Posts

FormatName or not with MSMQ ?

Today I was playing with MSMQ. I wrote a library which simply post some messages to a remote server (into the AD) queue. Everything worked fine under my test (unit test) applications but when I included the library to my web project the application crashed. Ough !! I got the exception: "System.Messaging.MessageQueueException: Queue is not registered in the DS."

I then queried Google in order to find the solution and I found it :-) The problem was on the queue name I used (label):

DIRECT=OS:servername\queuename

With the above queue name MSMQ queries the active directory in order to get some properties needed to contact the destination queue. In order to avoid this behavior I had to use direct format name so that MSMQ doesn't query the AD anymore, then my new name was:

FormatName:DIRECT=OS:servername\queuename

Posted: Feb 17 2005, 07:09 PM by PierreG | with 1 comment(s)
Filed under:
More Posts