If you're running Windows XP or Windows Server 2003, try this. Place a file called foo.asp in C:\, with foo.asp looking like this:
<% Response.Write "SEARCH-PHRASE" %> |
Now go to Start/Search/For Files and Folders, and enter the following:

When you hit Search you should see the same results I did: nothing was found.
The reason for this is that Windows has been "enhanced" to not consider script files like .ASP as text files it should search. (If anyone can track down the official reason they did this, an issue which
KB #309173 seems to sidestep, please
let us know.) There are some workarounds:
- Registry
You can fix this with a little registry tweak. (As always, our "modify the registry at your own risk" disclaimer applies here.)
Go to Start/Run, type "REGEDIT" without the quotes, and hit OK. Navigate to:
If there is no key under .asp called "PersistentHandler", then right-click the .asp node and select New > Key. Name it PersistentHandler. Highlight that key and move to the right pane. Double-click the default value.
I would copy the value that currently exists (mine was {eec97550-47a9-11cf-b952-00aa0051fe20}) before making this change, so you can revert if it produces unexpected results. Change the existing GUID to the following (the GUID of the Plain Text persistent handler):
| {5E941D80-BF96-11CD-B579-08002B30BFEB} |
Hit OK, close the registry and reboot. Let us know if this doesn't work for you.
- Visual Studio
Use the Find in Files... feature in Visual Studio IDE—it's fast and quite flexible. Many other text editors have a similar global find and replace feature.
- Source Control
Store your ASP code in source control, and use the search tool there.
- 3rd Party Products
Since Windows XP was first released, many software companies saw an opportunity to improve on the lackluster search capabilities (or to offer an alternative to that goofy dog that is there by default). Here are a few:
Advanced Find and Replace
Agent Ransack
Effective File Search
FileLocator Pro
FindFiles XP
InfoRapid Search &amp;amp;amp; R...
ReplaceEm
Search And Replace
V - The File Viewer
For even more potential products, see the Desktop Search Matrix and the Search Appliance Matrix. (Though it isn't clear from the matrix itself how flexible each tool is, e.g. how many could be customized to include .ASP files.)
- Index Server
If you're not already using Index Server, this is a last resort. Even if you are already using Index Server, this change will have drastic effects on the performance of your searches, since it will search ALL file types for the text you enter, not just those that are indicated in the registry as plain text files.
To make sure the Indexing Service is not restricted by file type, go to Start/Search/For Files and Folders, and click on Change Preferences. Click on "With Indexing Service." Make sure "Yes, enable Indexing Service" is checked, and click on "Change Indexing Service settings (Advanced)."
You will get an MMC dialog... click on View > Customize, make sure Console Tree is checked, and click OK.
Now right-click the top node on the left-hand side, and select Properties. Make sure that "Index files with unknown extensions" is checked.
Click Apply, click OK, close the MMC, and click on OK in the Search pane. Reboot.