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


 


 


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


 


 

Comments (17)

  1. Bob says:

    Someone try this ? Is this working ?

    Thanks

  2. Robert says:

    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.

  3. Jia-Sheng Liu says:

    Hello,

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

    What's the value of  W3SvcInstance ?

    Thank you.

  4. 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.

  5. Mike says:

    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:indexeswwwrootcatalog.wci

  6. Mike says:

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

  7. Mike says:

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

  8. Halford13 says:

    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!

  9. Sanju says:

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

  10. Abbas says:

    It worked for me. Thank you so much

  11. MikeBro says:

    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!!

  12. 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!

  13. 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!

  14. Sai says:

    Hi, I'm struggling with similar kind of issue. I'm using win2k8 R2 server and the indexing service enabled on a website where the virtual directories are mapped to remote host using UNC path. This was working fine on one server but not working on server that is cloned out of original server.

    Now the challenges here are: IDQ queries taking longer time than usual i.e., the query that took 1 second to retrieve results taking 1 minute in V2V'ed system. Also the re-indexing taking hell lot of time.

    Could some one please help me here…

    Thanks.

  15. Ms says:

    What if virtual directory created outside Default WebSite..What will be cscript adsutil.vbs set w3svc/1/root/MyVIR/ContentIndexed 1

  16. lakhi says:

    In my project, we are converting our entire windows server 2003 IIS6 website to Windows 2008 IIS7. As part of this we have developed an asp.net search page for a website hosted on the server under IIS 7+ windows server2008 r2 + Indexing Service. We also created asp.net search page using indexing services catalog.I am using Search the documents on the website using Search program. The page can able to display all the documents, But missing hyper links for that particular files. Any help would be appreciated on this issue. Here is my code

               System.Data.OleDb.OleDbConnection conn = new

               System.Data.OleDb.OleDbConnection(connstring); conn.Open();

               System.Data.OleDb.OleDbDataAdapter cmd = new

               System.Data.OleDb.OleDbDataAdapter(strQuery, conn);

               System.Data.DataSet testDataSet = new System.Data.DataSet();

               try

               {

                   cmd.Fill(testDataSet, "SearchResults");

                   DataView index = new DataView(testDataSet.Tables[0]);

                   int rcount = index.Count;

                   if (rcount == 0)

                   {

                       Response.Write("No Results");

                   }

                   else

                   {

                       DataGrid1.DataSource = index;

                       DataGrid1.DataBind();

                   }

               }

               catch (Exception ex)

               {

                   Response.Write(ex.Message);

               }

           }

           protected void DataGrid1_RowCommand(object sender, DataGridCommandEventArgs e)

           {

               Response.Clear();

               Response.ContentType = "application/octet-stream";

               Response.AppendHeader("Content-Disposition", "filename=" + e.CommandArgument);

               Response.TransmitFile(Server.MapPath("~/searchDocuments/") + e.CommandArgument);

               Response.End();

            }

  17. kiquenet says:

    Indexing Service is no longer supported as of Windows XP and is unavailable for use as of Windows 8. Instead, use Windows Search for client side search and Microsoft

    Search Server Express for server side search.
    https://msdn.microsoft.com/en-us/library/ee805985(v=vs.85).aspx

    Microsoft OLE DB Provider for Microsoft Indexing Service
    https://msdn.microsoft.com/en-us/library/ms681560(v=vs.85).aspx

    Microsoft Indexing Service exposes itself to the developer as an OLE DB provider. Its name is MSIDXS. You can use ADO.NET for querying your Indexing Service

    https://www.connectionstrings.com/ole-db-provider-for-index-server/

    Mindly notes:

    Any script in C# or Powershell for check if Index Service is installed and running – listening? or

    Any script in C# or Powershell for check if Provider=MSIDXS is installed ?

    Any script in C# or Powershell for List the OLEDB providers available in the system ?

    How install Microsoft OLE DB Provider for Index Server?
    Provider=MSIDXS.1
    C:\WINNT\System32\Query.dll

    Microsoft OLE DB Provider for Microsoft Index Server and Microsoft Site Server Search
    version 5.0.1781.3
    msidxs.dll

    http://www.opendll.com/index.php?file-download=msidxs.dll&arch=32bit&version=5.0.1781.3&dsc=Microsoft-OLE-DB-Provider-for-Microsoft-Index-Server-and-Microsoft-Site-

    Server-Search

    Downloading and installing Windows Search Server does not install the OLE DB provider. Neither does installing the Windows SDK. The provider is installed when the

    Windows Search Service is installed.

    On Win7/8 desktop OS, this is installed be default (I believe). On server Windows Server 2012, you have to enable the feature.

    Microsoft OLE DB Provider for Microsoft Indexing Service is MSIDXS . Windows Search Server is the same Microsoft Indexing Service?

    Windows Server 2008 r2 using Indexing Server ?
    Windows Server 2012 r2 using Microsoft Search ?

Skip to main content