0
Reply

Checking if a webservice (or any URL to that matter) is online.

Aleksey Nagoga

Aleksey Nagoga

Nov 8 2006 10:30 AM
1.5k

I googled around for it this morning and to my surprise couldn't find any quick and easy solution, so I started searching the namespaces and found this. Hope this helps.

System.Net.
WebRequest wr = System.Net.WebRequest.Create([URL]);
wr.GetResponse();
//this method throws a '404 not found' exception if it couldn't connect to the url.