Saturday, February 7, 2009

Differnce between Asp.net and Sharepoint safe mode parser

When a request is comes for an .aspx page Sharepoint ISAPI takes care about who will serve the request. Asp.net or Safemode parser(sharepoint).Before this you should know the concept of sharepoint ghosted and unghosted pages.In sharepoint some pages are lie in physical folder of server i.e, _layouts or _vti_bin folder. These pages are accessible for all applications.These pages are call ghosted pages.If we edit these pages through designer or through front page 2003 the pages become unghosted and a copy of each page is stored in the application content database. To make it clearghosted 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.Any webpart page or normal pages are ghosted by default.
The main difference between Asp.net and sharepoint pareser is, in asp.net for each first request of the page is compiled into assembly, and next request onwards the compliled page gets executed. In sharepoints safe mode parser is not compiled. They are interpretative pages. Remember its not possible to make unghosted page to its original ghosted pageSo if there is any inline server code in aspx page the safe mode parser will not allow the page to load

3 comments:

SharePoint Consulting said...

This is a really good read for me. Must admit that you are one of the best bloggers I ever saw. Thanks for posting this useful post.

sridhar said...

hi friend ..,i am sridhar thottempudi.., wt ur explained the differnce is excellent... can u justfiy for me "life cycle of sharepoint.."



thanks & regards
sridhar thottempudi...

IMBLOGGER said...

Hey Dhili,

Thanx for your post....I am newbee in SharPoint.

I am little confused about customization of application pages. These are pages that are installed by SharePoint itself under SharePoint_14/TEMPLATE/LAYOUTS and it is made available through _layouts virtual directory.

So according to me, application pages can not customized and it is also advisaeble that it should be customized. So these are not ghost pages.

Ghosted pages are the one which are processed through page templates which exists on the physical fle system of the web server. Once these pages gets customized, they become unghosted.

Please correct me if I am wrong. It will hemlp to enhance my knowledge.

Thanx...
Vikas