When I’m talking about ghost rendering, I won’t talk about Weapon rendering in Ghost Recon . This could be nice. But for now this post is about ghost pages and rendering with Microsoft Office SharePoint Server 2007
Since I’m struggling with passing data from sharepoint to custom aspx pages I ran into the question who is rendering my pages? Pages hosted in SharePoint can be rendered by the normal ASP.Net parser or by the SharePoint SafeMode parser.
When a request is received for an .aspx page, SharePoint determines (with help of the SpVirtualPathProvider) who will handle the rendering of the page: the normal ASP.Net or the SharePoint SafeMode parser.
The SafeMode parser does NOT compile pages. It is designed to interpretatively parse a page and create the object structure of the page. In the event inline server-side code is detected, the SafeMode parser will not allow the page to render. Additionally, the only objects within the page (i.e. controls marked as runat=server) which can be instantiated are those items found in the SafeControls list.
All pages within SharePoint are stored in the database. This effectively means that for each document, you will find a row in the docs table for that document. The actual file is stored in the ‘Content’ column. This is true for all files. However, there is one exception – some .aspx pages don’t actually have their content stored in the database. Instead, these pages reference files which exist on the server’s file system. These pages are considered ghosted pages.
From a technical standpoint, ghosted pages are those rows in the docs table which have null values for the Content column and a non-null value for the SetupPath column which points to a file on the file system itself. The referenced file essentially serves as a template and content source.