Subject: Check If Server/Machine Exists
Posted By: rodmcleay Post Date: 1/11/2006 1:33:05 AM
Hi All,
Im writing a class library to impliment a messging system with MSMQ.
I have provided configuration properties such as the machine name, queue name etc.

How can I determine if the Machine name they entered for the server holding the message queues exists.

I know I can test if the queue exists but was hoping to provide better feedback than that, to distinguish between  machine not existing and queue not existing.

Many thanks for your time

======================================
They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================
Reply By: DZukiewicz Reply Date: 4/15/2008 8:05:57 AM
You can use the Ping class to try and ping it if that would help?

You can also use the System.Net.Dns.GetHostName() method to resolve the IP address. If it resolves, it exists - hopefully!

Regards,

Dominic

Go to topic 70503

Return to index page 1