I was working on configuring a SharePoint 2010 farm and I received this error while trying to create an Enterprise Search Center on the root site collection.:
Detected use of SPRequest for previously closed SPWeb object. Please close SPWeb objects when you are done with all objects obtained from them, but not before. Stack trace: at Microsoft.SharePoint.WebControls.ScriptLink.SharePointClientJs_Register(Page page) at Microsoft.SharePoint.WebControls.ScriptLink.InitJs_Register(Page page) at Microsoft.SharePoint.WebControls.ScriptLink.RegisterForControl(Control ctrl, Page page, String name, Boolean localizable, Boolean defer, Boolean loadAfterUI, String language) at Microsoft.SharePoint.WebControls.ScriptLink.Register(Page page, String name, Boolean localizable, Boolean defer, Boolean loadAfterUI, String language, String uiVersion) at Microsoft.SharePoint.WebControls.ScriptLink.RegisterOnDemand(Page page, String strKey, String
I tried creating a blank site and a basic search center and there were no errors. It seemed that this error had something to do with some site collection level features. I activate the SharePoint Standard and Enterprise features and tried creating an Enterprise Search Center sub-site on the root site collection, result was same. I checked the ULS logs and the error was still the same.
I tried activating the SharePoint Server Publishing Infrastructure and then recreated the Enterprise Center, this time it worked like a charm!
The sad part is that nothing much can be inferred from the ULS log message.
There was this another error for the same corelation Id:
No document templates uploaded for list "$Resources:core,MasterPageGallery;" -- none found for list template "100".
Not sure what this really means, but I'm happy that the problem is solved.
Comments
Thanks a lot for this timely information. You saved me