WWW Crawler与IIS的WIA验证
WWW Crawler是ALUI中核心组件ALI中自带的功能组件,主要是用来抓取第三方网页,以Card的形式存放在Knowledge Directory中,并对网页的内容和metadata进行索引使其可搜索。
抓取一般的网站非常简单,用自带的World Wide Web web service就可以创建WWW Crawler,但是仅限于有Anonymous Access即匿名访问权限的Website。
对于有Windows Integrated Authentication验证的web site,以IIS为例,默认的WWW Content Source是无法对付的。
我们需要做:
- 创建一个新的Content Source WWW
- 创建新的Content Crawler WWW
- 创建一个job,定期执行(当然也可以创建,直接用其他job跑)
但是如果仅仅用WIA验证,WWW Crawler是无法抓取网页的。你会得到如下错误:
Feb 29, 2008 11:23:21 AM- *** Job Operation #1 failed: This crawl could not be launched because the location from which it was supposed to start, http://hostname/test could not be found or was inaccessible. When the crawler attempted to visit this location it received the following message: -2147203840 - CPTWebCrawlProvider::GetChildNodes, could not open : http://hostname/test(282610)
目前解决办法只有一个,就是enable Basic Authentication,也就是明文… 图中是IIS6,Server 2008中IIS7我已经找不到在哪里设置了,以后在研究了吧。


Apache httpd/Weblogic Server/Tomcat应该也有Basic Auth,还有待具体测试验证。估计如果是用和LDAP整合的验证,也是无法抓取的。
这样就可以抓了,这个问题应该是很容易解决的,在SharePoint Console中早就实现了该功能。不管是Windows SharePoint Service还是MOSS2007,都是WIA验证的,只要把这块代码重用一下就行了…
等待ALI 6.x (X>5)中解决这个问题了。