我现在实现 使用HttpWebRequest 类循环读取 网页连接中的数据!   常常在循环中出现 : 超时的问题!
我用了个老大的类是这样的!public static string GetRequestString(string requestUrl,int timeout,int enterType)
{
string strResult;
try 

HttpWebRequest myReq = (HttpWebRequest)HttpWebRequest.Create(requestUrl) ; 
myReq.Timeout =timeout;
HttpWebResponse HttpWResp = (HttpWebResponse)myReq.GetResponse();
Stream myStream = HttpWResp.GetResponseStream () ;
StreamReader sr = new StreamReader(myStream , Encoding.Default);
StringBuilder strBuilder = new StringBuilder(); while (-1 != sr.Peek())
{
strBuilder.Append(sr.ReadLine());
if(enterType==1)
{
strBuilder.Append("\r\n");
}
}
strResult = strBuilder.ToString();
}
catch(Exception exp)
{
strResult = "请求错误" + exp.Message;


 
}
return strResult ; 
}下面为我写的循环读取!   for(int i=0;i<Number;i++)
{
    
pos1 = str123.IndexOf(str456, pos2);
pos1 += str456.Length;
pos2 = str123.IndexOf(str789, pos1);

string urlxxx=str123.Substring(pos1, pos2 - pos1);
    int xxx=8000;
richTextBox2.AppendText("正在读取"+urlxxx);
    
    richTextBox2.AppendText(HttpPageRequest.GetRequestString(urlxxx,xxx,1));
richTextBox2.AppendText("\n");
richTextBox2.AppendText("------------------------------------------------------------");
  
             
}出现问题  一般能循环读取5条左右!  然后就显示
正在读取:http://xxx.com/xxx1.htm   连接超时
正在读取:http://xxx.com/xxx2.htm   连接超时
一直超时下去!大家有什么好办法???