- What exception or http status code for when the server is down
- try
- {
- WebRequest webRequest = WebRequest.Create(uri);
- webRequest.Method = "GET";
- HttpWebResponse httpWebResponse = (HttpWebResponse)webRequest.GetResponse();
- }
- catch () //what excpetion will tell me server is down??
- {
- ...
- }