Prescan Error: Exception scanning web, The system cannot find the file specified.
Posted: July 28, 2008 Filed under: prescan, SharePoint, Troubleshooting, Upgrade 3 Comments »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=0×409.
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).

Hi Rafelo, thanks for this post. I’ve been having trouble finding out why my prescan reports errors about (Error: Prescan has encountered sites or lists that were not updated because the…etc)but the databaserepair switch returns 0 orphaned objects. My webtemp.xml is bog standard with no commented site defs or anything. Amongst other things, I’d like to know if you have to have a MOSS install ready to go for a prescan of SP2003 to work sucessfully? I’m thinking not because I am just going to migrate the content to the new MOSS environment…in that respect, is a prescan even necessary? thanks, and I hope you are well
Hello Stunz, thanks for posting. You dont need MOSS installed to run the prescan.exe file. You can just copy it to the SharePoint 2003server. In regards to your question whether its even necessary. It depends on what you consider “Migrating” the content. If using the database migration approach, where you use the stsadm addcontentdb operation to add the 2003 content databases to MOSS, you will in fact need to run the prescan utility. The only way I know you can get away with Migrating content from 2003 to 2007 without running the prescan utility, is through the use of a third party utility such as Metalogix.
Hi Rafelo,
i get this error and i have tried running repairdatabase command and the result is –
OrphanedObjects Count=”0″ />
i have also looked at WEBTEMP.xml and cant see anything that makes sense, can you please help to get rid off this error, before i kill myself. Please? Thanks
10/06/2009 10:30:15 Error: Cannot get content database Id for SPSite: http://server-sharepoint/sites/aramark
10/06/2009 10:30:15 Microsoft.SharePoint.SPException: There is no Web named “/sites/aramark”. —> System.Runtime.InteropServices.COMException (0×81070504): There is no Web named “/sites/aramark”.
at Microsoft.SharePoint.Library.SPRequestInternalClass.OpenSite(String bstrUrl, Boolean bGetUrlOnly, String& pbstrServerRelativeUrl, Guid& pgSiteId, Int32& pOwnerID, Int32& pSecondaryContactID, DateTime& pdtLastContentChange, DateTime& pdtLastSecurityChange)
at Microsoft.SharePoint.Library.a.a(String A_0, Boolean A_1, String& A_2, Guid& A_3, Int32& A_4, Int32& A_5, DateTime& A_6, DateTime& A_7)
— End of inner exception stack trace —
at Microsoft.SharePoint.Library.a.a(String A_0, Boolean A_1, String& A_2, Guid& A_3, Int32& A_4, Int32& A_5, DateTime& A_6, DateTime& A_7)
at Microsoft.SharePoint.SPSite.c()
at Microsoft.SharePoint.SPSite.get_ID()