Fixed it. The thing is that in the constructor of a page, session is null. This also means members declared with new. Things like "private MyObject mo=new MyObject()" call the ctor or MyObject at the instantiation of the page and if that ctor tries to access HttpContext.Current.Session you get the weird case where Response, Request, Server and Application are not null, but Session is null.
Solution: move the instantiation of classes in the PageLoad event whereever possible and also check for HttpContext.Current.Session!=null.
----------
Siderite
|