Possible Duplicate:
Check if a server is available
I’m writing a program in C# that queries the Windows servers on our domain, one after another. Currently the program will hang waiting for a reply if a server is offline or has a fault, what is the best way to wait and if no response is received move on to the next server? I’ve never had to do this before so any help is much appreciated.
Thanks
Steve
It sounds as though you want to take a look at BackgroundWorker and threading (the Thread class). I imagine you’re blocking the UI thread by making whatever call it may be to check on your servers.
By using threading you can report back to the user exactly what is going on and apply your own timeouts if need be.