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
Anonymous
June 08, 2010
Someone try this ? Is this working ?ThanksAnonymous
June 13, 2010
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.Anonymous
August 19, 2010
Hello,"the value of W3SvcInstance is your selected web site instance."What's the value of W3SvcInstance ?Thank you.Anonymous
September 02, 2010
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.Anonymous
January 19, 2011
HiI have switched on indexing for a website but all the counts Size Mb,Total Docs,Docs to index,Deferred etc remain at 0Looking 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.wciAnonymous
January 19, 2011
hi I can now see the folders but all the counters are still 0 so have no idea if anything is happeningAnonymous
January 19, 2011
the catalog.wci folders are there for each index but the files inside them are not changing or growing in size.Anonymous
January 26, 2011
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!Anonymous
July 14, 2011
Yes it worked for me. Created Virtual directry under Default web site and set W3SvcInstance to 1 (the ID of the Default Web Site)Anonymous
August 25, 2011
It worked for me. Thank you so muchAnonymous
June 20, 2012
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!!Anonymous
July 11, 2012
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!Anonymous
July 12, 2012
If you cannot see adsutil.vbs, please follow this plan:Install IIS 6 Management Compatibility============================= Click Start , point to All Programs , point to Administrative Tools , and then click Server Manager . In the console tree of Server Manager, Expand Roles , and then right click Web Server(IIS). Click Add Role Services In the Add Role Services Wizard, select IIS 6 Management Compatibility, and then click Next . Follow the instructions in the Add Role Services Wizard to complete the installation. Thanks!Anonymous
December 11, 2013
The comment has been removedAnonymous
February 01, 2015
What if virtual directory created outside Default WebSite..What will be cscript adsutil.vbs set w3svc/1/root/MyVIR/ContentIndexed 1Anonymous
May 05, 2015
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(); }Anonymous
June 16, 2016
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).aspxMicrosoft OLE DB Provider for Microsoft Indexing Servicehttps://msdn.microsoft.com/en-us/library/ms681560(v=vs.85).aspxMicrosoft 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 Servicehttps://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? orAny 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.dllMicrosoft OLE DB Provider for Microsoft Index Server and Microsoft Site Server Searchversion 5.0.1781.3msidxs.dllhttp://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-SearchDownloading 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 ?