#SharePoint Web Front-End HTTP 404 Response but no errors in the log #SP2010 #PS2010 #MSProject #ProjectServer #in
Recently we had to restore a content database from back up at a client. We were working on APP1 of a 2 WFE + Database configuration.
We followed the usual steps:
- Restore database into SQL Server from backup as a different name (<ServerName>_ContentDB_20111028)
- Log into Central Administration
- Go to Manage Content Databases
- Remove the existing Content Database
- Add the newly restored database (<ServerName>_ContentDB_20111028)
- Restart IIS (not required but just for good measure)
After doing this, APP1 worked find, but APP2 however kept giving the HTTP Response Error: 404.
We checked the usual places:
- ULS Logs
- Windows Event Logs
- IIS Logs
No other errors apart from the 404 Not Found error.
To try and force an error we went to some the standard SharePoint pages on the file system such as:
This forced the following error to appear in the ULS logs:
- Unexpected System.NullReferenceException: Object reference not set to an instance of an object
A quick Google and the following came up:
The steps below are slightly modified from the one mentioned in the post but it ultimately resolved the issue:
- Stop the OWSTIMER service on the problem SharePoint WFE server in the farm.
- On the problem server, navigate to:
Server 2003 location: Drive:\Documents and Settings\All Users\Application Data\Microsoft\SharePoint\Config\GUID and delete all the XML files from the directory.
Server 2008 location: Drive:\ProgramData\Microsoft\SharePoint\Config\GUID and delete all the XML files from the directory.
- Delete all the XML file in the directory. NOTE: ONLY THE XML FILES, NOT THE .INI FILE.
- Open the cache.ini with Notepad and reset the number to 1. Save and close the file.
- Start the OWSTIMER service on the server and wait for XML files to begin to reappear in the directory.
- IIS Reset (just for good measure)
Took us a good couple of hours to resolve this one, so hopefully it can help you too.
Full Log Example:
10/28/2011 09:30:41.30 w3wp.exe (0×1508) 0×1204 SharePoint Foundation Runtime tkau Unexpected System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.SharePoint.SPSite.PreinitializeServer(SPRequest request) at Microsoft.SharePoint.SPWeb.InitializeSPRequest() at Microsoft.SharePoint.WebControls.SPControl.EnsureSPWebRequest(SPWeb web) at Microsoft.SharePoint.WebControls.SPControl.SPWebEnsureSPControl(HttpContext context) at Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.GetContextWeb(HttpContext context) at Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.PostResolveRequestCacheHandler(Object oSender, EventArgs ea) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& complet… 97bd5397-9665-4f46-82ed-c5e702f8ccd0
10/28/2011 09:30:41.30* w3wp.exe (0×1508) 0×1204 SharePoint Foundation Runtime tkau Unexpected …edSynchronously) 97bd5397-9665-4f46-82ed-c5e702f8ccd0