Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New MSMQ object using IP for Queue

Status
Not open for further replies.

NevG

Programmer
Oct 10, 2000
162
GB
Hi gang

Can someone tell me how I can change the code below to work using an IP address.. I cant fdind anything anywhere to help me so Im hoping you guys can..

MessageQueue MSMQueue = new MessageQueue(ConfigurationSettings.AppSettings["QueueAddress"])

Help me PLEEEEEASE!!!

Cheers

Nev G
 
Mainly you have to set the Path of the queue which includes the MachineName or . for the local computer.
It is mandatory to pass the computer name because it is stored in the MessageQueue.MachineName property and does not support IP address.
So you cannot use something like :

MessageQueue MSMQueue = new MessageQueue("123.123.123.1\\Private$\\myQueue");
but :

MessageQueue MSMQueue = new MessageQueue("myQueueComputerName\\Private$\\myQueue");

-obislavu-

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top