Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 11th, 2006, 02:33 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
Default Check If Server/Machine Exists

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.
"They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad."
Old April 15th, 2008, 08:05 AM
Authorized User
Join Date: Dec 2004
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to DZukiewicz

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!



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to check if exists BEFORE the Insert rtr1900 Classic ASP Databases 0 December 20th, 2006 07:04 AM
check whether a particular session exists or not chayanvinayak PHP How-To 1 May 1st, 2006 04:09 PM
check first to see if the file exists crmpicco Classic ASP Professional 2 December 1st, 2005 12:34 PM
how to check that node is exists debuajm General .NET 0 June 8th, 2004 02:07 AM
How to check if connection already exists Ciarano VB How-To 3 March 9th, 2004 10:24 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.