Uri URL2 = new Uri(@"http://www......com");
HttpWebRequest request2 = (HttpWebRequest)WebRequest.Create(URL2);
request2.Timeout = 10000;
HttpWebResponse response2 = (HttpWebResponse)request2.GetResponse();
I am making webrequest with the codes above. When I write a stupid url such as www.oiasjdilasod.com it throws exception; however when an existing page is not available for few hours I cannot get this exception. it doesn't throw any exception and stop running. When this page is not available i tried at internet explorer, it showed page can not be found http 400 bad request. Do you have any suggestions how to catch this exception?