检测 一个网站URL是否可以正常访问
WebClient webClient = new WebClient(); try { webClient.OpenRead("http://www.wq8.cc/index.a"); } catch (Exception ex) { Response.Write(ex.Message); }
WebClient webClient = new WebClient(); try { webClient.OpenRead("http://www.wq8.cc/index.a"); } catch (Exception ex) { Response.Write(ex.Message); }