I'm using webservices and in my remote application I access them (duh)
The webservice and the remote app are going to be in a VPN so connection losses are quite possible...
Now my code is like such:
try{
//instantiate webservice, set it's url (ex //call a service's function
}
catch(System.Net.WebException ex)
{//do stuff here}
This function runs on it's own thread but even so the GUI hangs for about 3 seconds if the network is down.
So the question is... is there a more effecient way than exceptions to check if a URL is real/accessible?
The webservice and the remote app are going to be in a VPN so connection losses are quite possible...
Now my code is like such:
try{
//instantiate webservice, set it's url (ex //call a service's function
}
catch(System.Net.WebException ex)
{//do stuff here}
This function runs on it's own thread but even so the GUI hangs for about 3 seconds if the network is down.
So the question is... is there a more effecient way than exceptions to check if a URL is real/accessible?