如何用Indexing Service来对Windows Server 2008中的IIS 7.0网站进行索引

根据如下步骤进行操作:

安装IIS 6 Management Compatibility

=============================

  • 点击Start->All Programs->Administrative Tools, 之后点击ServerManager
  • 在Console tree of Server Manager, 展开Roles,之后右键Web Server(IIS),点击Add Role Services
  • 在Add Role Service Wizard中,选择IIS 6 management compatibility, 然后点击Next
  • 按照Add Role Service Wizard中的instruction来完成安装

选择你要找的 web site

==============================

  • 在Indexing MMC中右键点击你的catalog选择Properties
  • 点击Tracking tab
  • 在"WWW Server"下拉列表中选择web site
  • 点击OK
  • 如果再次打开property页面,你可以看到"WWW Server"区域还是空的,这个只是一个UI的问题。
  • 为验证是否选择了这个web site,检查下苏注册表的值:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ContentIndex\Catalogs\[Catalog Name]

IsIdexingW3Svc

W3SvcInstance

IsIdexingW3Svc的值应该是1,W3SvcInstance应当是所选的web site instance

设置ContentIndexed metabase property

==============================

在windows 2003中如果想要索引一些webpage的话可以在virtual directory中选择"Index this resource"。但是在windows 2008中没有相关选项的管理界面。必须要使用下述命令:

  • 打开命令行,指向当前目录%systemdrive%\inetpub\adminscripts。
  • 运行命令:cscript adsutil.vbs set w3svc/[web site instance]/root/[virtual director]/ContentIndexed 1
  • 例如如果想开启虚拟目录MyVIR of the default web site 的"Index this resource"功能,运行cscript adsutil.vbs set w3svc/1/root/MyVIR/ContentIndexed 1

在开启上诉功能后,就可以重启Indexing Service,Indexing Service会自动检查IIS配置并生成catalog。

XinJin

-微软全球技术支持中心Internet 开发者支持组