The hit-highlighting component of the Indexing Service may return indexed results from content on an Internet Information Services (IIS) site without enforcing the authentication scheme that is applied to the content.
If you need the Indexing Service but do not need hit-highlighting, you should disable the hit-highlighting component. To do this, follow these steps, depending on the version of IIS that you are using.
IIS 7.0
To disable hit-highlighting in IIS 7.0 when the Indexing Service is installed, follow these steps:
Start IIS Manager. To do this, click Start, click Run, type inetmgr, and then click OK.
In the navigation pane, double-click ISAPI and CGI Restrictions.
In the Status column, note the status for the Indexing Service item. If the status is Allowed, click Allowed, and then click Deny in the Tasks window.
IIS 6.0
To disable hit-highlighting in IIS 6.0 when the Indexing Service is installed, follow these steps:
Start IIS Manager. To do this, click Start, click Run, type inetmgr, and then click OK.
In the navigation pane, click Web Service Extensions.
In the Status column, note the status for the Indexing Service item. If the status is Allowed, click the Indexing Service item, and then click Prohibit.
IIS 5.1 and IIS 5.0
To disable hit-highlighting in IIS 5.1 or in IIS 5.0 when the Indexing Service is installed, follow these steps:
Install and then run the IIS Lockdown Tool. You can download version 2.1 of the IIS Lockdown Tool from the Microsoft Download Center.
The following file is available for download from the Microsoft Download Center:
Method 3: Verify the Indexing Service and hit-highlighting configuration
If you need both the Indexing Service and the hit-highlighting component, you should make sure that your .htw files require the same type of IIS authentication that your content requires. Additionally, you should make sure that the script mapping for .htw files has the Check that file exists option enabled. To verify the correct script-mapping settings, follow these steps, depending on the version of IIS that you are using.
IIS 7.0
Start IIS Manager. To do this, click Start, click Run, type inetmgr, and then click OK.
In the navigation pane, double-click Handler Mappings.
In the Handler Mappings table, find the mapping for .htw. Double-click the mapping.
Click Request Restrictions.
Click Invoke handler only if requests are mapped to, and then make sure that File is selected.
Click OK two times.
IIS 6.0, IIS 5.1 and IIS 5.0
In the IIS Microsoft Management Console (MMC) snap-in, right-click the Web site, and then click Properties.
Click the Home Directory tab, and then click Configuration.
In the Application Configuration dialog box, click the mapping for .htw, and then click Edit.
Make sure that the Check that file exists check box is selected, and then click OK.
Note In IIS 6.0, this check box is named Verify that file exists.
Verify that the IIS authentication settings for your content are the same as the authentication settings for your .htw files.
The hit-highlighting component is a part of the Indexing Service that works with IIS to return indexed content from a Web site. When the hit-highlighting component accesses the URL to be indexed, the component does this by directly accessing the content for the URL and not by making a new request through IIS. Because of this, any IIS-specific authentication is not applied to the URL that is indexed by the hit-highlighting component.
A Web browser can request indexed content by making a request to an .htw file on the Web site and by specifying the URL to be indexed. If IIS authentication is desired for indexed content, authentication should be set on the .htw file and also on the actual content. Hit-highlighting includes a special, built-in .htw file that is named Null.htw. This is a virtual file and does not actually exist on the disk. Because this file does not exist, you cannot configure IIS to enforce authentication on this file. To prevent Null.htw from returning indexed content, you must configure the IIS script mapping for .htw so that the mapping uses the "Check that file exists" feature.
The following table summarizes the default availability of the hit-highlighting component in various versions of IIS.
Collapse this tableExpand this table
Version
Indexing Service
Hit-highlighting
IIS 7.0
Not installed
Disabled when the Indexing Service is installed
IIS 6.0
Installed
Installed but disabled
IIS 5.1
Not installed
Not installed
IIS 5.0
Installed
Installed and enabled
Acknowledgment: Joao Gouveia of Telecel-Vodafone and John Omernik contributed to this Microsoft Knowledge Base article.