C# crawledPage.HttpWebResponse在Abot中为空

C# crawledPage.HttpWebResponse在Abot中为空,c#,assemblies,web-crawler,httpwebresponse,C#,Assemblies,Web Crawler,Httpwebresponse,我正在尝试使用 我遵循了这个原则,但我似乎无法使它起作用 它在方法crawler\u processpagecrawlpompled中有一个未处理的异常,具体如下: if (crawledPage.WebException != null || crawledPage.HttpWebResponse.StatusCode != HttpStatusCode.OK) { Console.WriteLine("Crawl of page failed {0}", crawledPage.Ur

我正在尝试使用

我遵循了这个原则,但我似乎无法使它起作用

它在方法
crawler\u processpagecrawlpompled
中有一个未处理的异常,具体如下:

if (crawledPage.WebException != null || crawledPage.HttpWebResponse.StatusCode != HttpStatusCode.OK) 
{
   Console.WriteLine("Crawl of page failed {0}", crawledPage.Uri.AbsoluteUri);
}
因为
crawledPage.HttpWebResponse
为空

我可能错过了什么,但是什么

注释和完整代码: 我按照教程的建议编辑了app.config文件,下面是我的类(引用Abot.dll):

错误在第84行

另外,第60行还有一个额外的细节(也许它表明了我遗漏了什么),即:

'Abot.Poco.CrawlResult' does not contain a definition for 'ErrorMessage' and no extension method 'ErrorMessage' accepting a first argument of type 'Abot.Poco.CrawlResult' could be found (are you missing a using directive or an assembly reference?)

谢谢你的帮助

这意味着您遇到了一个不响应http请求的url(即它不存在)。这可能会导致HttpWebResponse和WebException属性都为null

'Abot.Poco.CrawlResult' does not contain a definition for 'ErrorMessage' and no extension method 'ErrorMessage' accepting a first argument of type 'Abot.Poco.CrawlResult' could be found (are you missing a using directive or an assembly reference?)