当我尝试加载以下页面时:
http://www.manta.com/c/mm0mg7z/law-office-of-wendy-kazel
使用 httpwebrequest(我使用下面的代码)
try {
HttpWebRequest _wReq;
HttpWebResponse _wResp;
System.IO.StreamReader _sr;
System.Text.ASCIIEncoding _enc = new System.Text.ASCIIEncoding();
_wReq = (HttpWebRequest) WebRequest.Create("http://www.manta.com/c/mm0mg7z/law-office-of-wendy-kazel");
_wReq.UserAgent = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)";
_wReq.Timeout = 20000;
_wReq.ReadWriteTimeout = 20000;
_wReq.Referer = "http://www.manta.com";
_wResp = (HttpWebResponse) _wReq.GetResponse();
_sr = new System.IO.StreamReader(_wResp.GetResponseStream());
_html = _sr.ReadToEnd();
_sr.Close();
_wResp.Close();
} catch (WebException ee) {
}
我从 manta 得到以下返回的 html
Oops.
Before you can move on, please activate JavaScript.
它并不总是发生,但大多数时候。
知道可能是什么问题吗?