Thursday, October 28, 2010

FileNotFoundException on Custom Page Layout

Out of about 30 page layouts we had for a SharePoint 2007 to 2010 upgrade, one of the page layouts was giving us the following error:

System.IO.FileNotFoundException: File Not Found.
at Microsoft.SharePoint.ApplicationRuntime.SPLocalFileInfo.GetSPLocalFileInfo(String physicalPath, Byte setupPathVersion, Boolean useFallBackLogic)
at Microsoft.SharePoint.ApplicationRuntime.GhostedFileTemplateInfo..ctor(Byte verGhostedPage, String physicalPath)
at Microsoft.SharePoint.ApplicationRuntime.SPDatabaseFile.SetFetchedInformation(Boolean fGhostedPage, Byte verGhostedPage, String pageContent, Guid docId, UInt32 docVersion, String timeLastModified, SPFileLevel level, String masterPageUrl, String customMasterPageUrl, String webUrl, String siteUrl, Guid siteId)
at Microsoft.SharePoint.ApplicationRuntime.SPDatabaseFile..ctor(String virtualPath, Boolean accessDenied, Boolean fGhostedPage, Byte verGhostedPage, Guid docId, UInt32 docVersion, String timeLastModified, SPFileLevel level, String masterPageUrl, String customMasterPageUrl, String webUrl, String siteUrl, Guid siteId, SafeControls safeControls, PageParserSettings pageParserSettings, String pageContent, Object buildDependencySetData, SPWebPartCollectionInitialState initialState)

Any changes we made to the file on the filesystem would not take. Turns out that the page layout was in a weird state -- checked out but not approved (even though it had been previously approved). So we just checked the file out, then back in, and we'd see our new changes that it would read from the SharePoint root directory.

Monday, October 18, 2010

Getting login prompts that won't authenticate, and then a blank page

If you create a new site collection and try hitting your URL but it will not authenticate, and then defaults to a blank white page make sure that you have done the DisableLoopbackCheck in the registry:

http://support.microsoft.com/kb/896861