解决方法:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(webURL);
//声明一个HttpWebRequest请求
request.Timeout = 30000;
//设置连接超时时间
request.Headers.Set("Pragma", "no-cache");
request.UserAgent = "Mozilla-Firefox-Spider(Wenanry)";