Just recently, I ran into a problem running the prescan utility where a series of sites reported the following errors:

Error: Exception scanning web: http://intraneturl/sites/samplesite
System.IO.FileNotFoundException: The system cannot find the file specified.

Error: The following site has not been scanned. Id = f3b05792-52a4-4a85-9b26-19905f23cf46 and Url = /sites/samplesite

Error: Prescan has encountered sites or lists that were not updated because they cannot be accessed using the SharePoint Products and Technologies object model. The most likely reasons for Prescan to skip a list are covered in the Knowledge Base article at: http://go.microsoft.com/fwlink/?linkid=69958&clcid=0x409.

The recommended Knowledge Base article indicates that the problem may be caused by database corruption which can be solved using the databaserepair command line operation of stsadm. Running the command should produce a list of orphaned objects. Calling the command again with the “deletecorruption” parameter would delete the orphaned objects.

But what if the command doesn’t find any orphaned objects? This was the problem I ran into. Running the databaserepair command would always produce the following response.

First I decided to take a look at the sites that where reporting the “Exception scanning web” error; opening these sites in the browser returned the following “list does not exist” error.


This led me to believe there might be something wrong with the site definition. With a little more research, I found that all of the sites reporting this error were in fact based on the same site definition.

Cause: As it turns out, the Site Definition used had been commented out in the “WebTemp.xml” file (I’ve seen many people do this to prevent certain site definitions from showing up in the list of available templates.)

Note: None of the sites identified by the error “The following site has not been scanned. Id = SOMEGUID and Url …..” were the cause of the problem; it was always a sub-site, specifically the ones that generated the “Exception Scanning Web” and “FileNotFoundException” errors.

Solution: Make sure any site definitions used are included in one of the “WebTemp.xml” files (they must not be commented out.) After correcting (or updating) the WebTemp.xml files, you’ll need to run an IISReset. You should then be able to browse the sites without receiving an error and re-run the prescan.exe utility (hopefully you wont run into something else).