Problem in adding web part to Page layout

Jan 19, 2009 at 12:16 PM
Hi
I need to create a page layout with three web parts embedded in it.
I'm using SharePoint Designer for this.
I'm facing problem while adding a web part which accesses HttpContext.Current.Session.
The error i'm getting is "Object reference not set to an instance of an object". It seems the Session object is not getting initialised properly.
This problem occurs only in the case of Page Layout. The web part works fine when added to a page. Can anyone provide a workaround or solution for this problem?