AsiaTech: Microsoft APGC Internet Developer Support Team

We focus on various troubleshooting plan and solution on IIS web platform and distributed applications

How to index IIS 7.0 Web sites in Windows Server 2008 by Indexing Service

How to index IIS 7.0 Web sites in Windows Server 2008 by Indexing Service

  • Comments 13

 

 

We can use the following steps:

 

Install IIS 6 Management Compatibility

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

 

1.            Click Start , point to All Programs , point to Administrative Tools , and then click Server Manager .

2.            In the console tree of Server Manager, Expand Roles , and then right click Web Server(IIS). Click Add Role Services

3.            In the Add Role Services Wizard, select IIS 6 Management Compatibility, and then click Next .

4.            Follow the instructions in the Add Role Services Wizard to complete the installation.

 

Select the web site you want to search

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

 

1.       In Indexing MMC right click your catalog and choose Properties.

2.       Click Tracking tab.

3.       Select the web site in “WWW Server” dropdown list.

4.       Then click OK.

5.       If you open the property page again, you will see that “WWW Server” field is still empty. But it is just a UI issue.

6.       To verify whether you select the web site, please check the following values under the registry: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ContentIndex\Catalogs\[Catalog Name]

IsIndexingW3Svc

W3SvcInstance

                               

Make sure the value IsIndexingW3Svc is 1 and the value of W3SvcInstance is your selected web site instance.

 

Set ContentIndexed metabase property

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

 

In Windows 2003 you can select the option “Index this resource” on the virtual directory if you want to index some web pages. But in Windows 2008 there is no administrative UI for you to enable this option. We have to use command line scripts:

1.       Open a command prompt and change the current directory to %systemdrive%\inetpub\adminscripts.

2.       Run the command: cscript adsutil.vbs set w3svc/[web site instance]/root/[virtual director]/ContentIndexed 1

 

For example, if you want to enable “Index this resource” on the virtual directory MyVIR of the default web site, you can run: cscript adsutil.vbs set w3svc/1/root/MyVIR/ContentIndexed 1

 

After you enable the above options, you can restart your indexing service. The indexing service will automatically check the IIS settings and generate the catalog.

 

Regards,

 

Xin Jin

 

 

Leave a Comment
  • Please add 6 and 8 and type the answer here:
  • Post
  • Someone try this ? Is this working ?

    Thanks

  • Yes, I have and it seems to work fine. My issue is custom docproproperty definition. I cannot seem to define the "friendly name" for use as with ixsso util in W2K3. It would be nice to see more (any) MS documentation / samples to use Windows Search service, as a replacement in .net/classic asp development of search, vs. using Indexing Service.

  • Hello,

    "the value of W3SvcInstance is your selected web site instance."

    What's the value of  W3SvcInstance ?

    Thank you.

  • Hi Jia-Sheng, the value of W3SVCInstance means Site ID indeed. On IIS7, open Inetmgr, check the "Advanced Settings" of this site, you can see the Site ID.

  • Hi

    I have switched on indexing for a website but all the counts Size Mb,Total Docs,Docs to index,Deferred etc remain at 0

    Looking in the directory the index is supposed to appear there are no files.  The application event log says CI has started for catalog d:\indexes\wwwroot\catalog.wci

  • hi I can now see the folders but all the counters are still 0 so have no idea if anything is happening

  • the catalog.wci folders are there for each index but the files inside them are not changing or growing in size.

  • Hi dsifof,

    I'm trying to get the url of my files so I set up the W3SvcInstance to 1 (the ID of the Default Web Site), but the url field of next query, "Select DocTitle,Filename,Size,PATH,URL from SCOPE() where FREETEXT('word')", is empty. So, under "Default Web Site" I have few virtual directories and applications. The folder for which I created my catalog under Indexing Services belongs to one of those applications. In other words, I try to search only in "www.my_website.com/my_folder/" and I created a catalog for "c:/inetpub/wwwroot/my_website/my_folder/". Now, the PATH column is populated with "c:/inetpub/wwwroot/my_website/my_folder/my_file.txt".

    Thanks in advance!

  • Yes it worked for me. Created Virtual directry under Default web site and set  W3SvcInstance to 1 (the ID of the Default Web Site)

  • It worked for me. Thank you so much

  • Xin Jin,

    Thank you for "Set ContentIndexed metabase property."  I have tried for several days get get Index Server on 2008 server to generate usable paths.  This did the trick.  Thank you!!

  • I have installed index service on my Windows 2008 server R2 and I want to index the IIS 7.5 web sites on the same server. It seems there is no such folder called adminscripts in inetpub. So I cannot  the command you mentioned (cscript adsutil.vbs set w3svc/[web site instance]/root/[virtual director]/ContentIndexed 1) to set contentindexed metabase property on my server. What should I do? Please help!

  • If you cannot see adsutil.vbs, please follow this plan:

    Install IIS 6 Management Compatibility

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

    1.            Click Start , point to All Programs , point to Administrative Tools , and then click Server Manager .

    2.            In the console tree of Server Manager, Expand Roles , and then right click Web Server(IIS). Click Add Role Services

    3.            In the Add Role Services Wizard, select IIS 6 Management Compatibility, and then click Next .

    4.            Follow the instructions in the Add Role Services Wizard to complete the installation.

    Thanks!

Page 1 of 1 (13 items)