var uri = new Uri("http://store.scrapbook.com/cos-pad825.html?t12-13=cosmo%20cricket&date=20110309");
var request = (HttpWebRequest)WebRequest.Create(url);
var cookieContainer = new CookieContainer();
request.CookieContainer = cookieContainer;
request.UserAgent = @"Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5";
request.Method = "GET";
request.AllowAutoRedirect = true;
request.Timeout = 15000;
var response = (HttpWebResponse)request.GetResponse();
var page = new HtmlDocument();
var stream = response.GetResponseStream();
page.Load(stream);
導致錯誤。在加載(流)調用。有任何想法嗎?HtmlAgilityPack HtmlDocument.Load拋出異常「對象未設置爲實例」
是空的嗎? – 2011-03-18 09:02:02
這裏是在HtmlAgilityPack.HtmlDocument.ReadDocumentEncoding(HtmlNode節點) 堆棧跟蹤在HtmlAgilityPack.HtmlDocument.PushNodeEnd(的Int32索引,布爾接近) 在HtmlAgilityPack.HtmlDocument.Parse() 在HtmlAgilityPack.HtmlDocument.Load(TextReader的閱讀器) – 2011-03-18 09:19:17
我認爲你最好的選擇是調試這段代碼。從codeplex獲取源代碼並進行調試。 – 2011-03-18 09:40:44