Sharepoint 2007 - No more Ghosting / Unghosting

Posted on 7/6/2006 @ 11:39 PM in #SharePoint by | Feedback | 4168 views

You remember ghosting/unghosting in Sharepoint 2003? Yes, I am talking about that concept where you had one physical file serve/act as many, until of course you wanted to customize it.

Sharepoint 2007, built in ASP.NET 2.0, doesn't do that. That is a good thing, because all your customization doesn't get litterred all over the place as multiple files. Your customization sits in the database.

You see, ASP.NET 2.0 has a new concept called Virtual Page Parser. That allows the Sharepoint runtime to query for the aspx as a combination of what is on the file system, and what is in the database. That combination, then appears as a single aspx, and is then run through the pipe of ASP.NET - hence ending up as a class somewhere deep inside temporary asp.net files.

The huge advantage of this approach is of course the ability to revert back to what used to be your page before you completely screwed it up. The hella cool thing is, even Sharepoint designer will clearly show you what pages are customized and what are not. Observe, deeply the exclamation mark below denoting a customized master page.

 And before we cause any more confusion, we are not playing with the "Ghosting/Unghosting" terms anymore. We're doing "Customized and Uncustomized" now.

Sound off but keep it civil:

Older comments..


On 7/7/2006 7:02:38 AM Rob Garrett said ..
"Sharepoint 2007, built in ASP.NET 2.0, doesn't do that. That is a good thing, because all your customization doesn't get litterred all over the place as multiple files. Your customization sits in the database."

Just to clarify... SP2003/WSS2 also placed un-ghosted files in the DB. Since ASP.NET 1.1 could only parse ASPX pages from disk files the SP team recreated their own page parser, with less functionality of that of the ASP.NET page parser.

Also, SP2003/WSS2 used an ISAPI layer to inject SP behavior in the page lifecycle, rather than letting ASP.NET manage it.

FrontPage was missing the feature to revert un-ghosted pages back to the file system ghosted page. Re-ghosting could still be achieved in SP2003/WSS2 by removing data from tables in the DB - urgh.


On 7/9/2006 10:28:14 AM Jeeva said ..
Thats really good info for me.. i really faced many difffculties in custimization.. thanks for the info shail.


On 6/8/2007 7:00:03 PM Woody Means said ..
It a good thing that SharePoint developer can handled the .aspx parsing on the fly. The concept of customization is still uncleared.

Here what I did in SharePoint 2007:


I created two Portal sites.


I wanted to have two different master pages: one with AJAX support and the other is just vanilla. To my knowleldge, I did not open the default.master page from SharePoint Designer. However, it moved the default.master file into the database. Don't know what exactly happened there!

Site2 is still intact. The default.master for Site2 is pulled from the database.

My question is that WHEN does SharePoint "Customize" the physical default.master file for Site2?

Perhaps, you try it and find out. Create two portal sites and look at the master page gallery, and then made some small changed on the SharePoint default.master and see if both sites uses the same physical default.master page file.

My gut feeling says that when you touched the physical default.master page file for Site1, Site2 knows how to NOT to use the default.master page.

Blah, Blah...