Setting value for CurrentPage

Vote:
 
I have made a custom 404-page (/notfound.aspx) and changed the value in IIS custom errors to point to this page. In order to have the page's content editable in EPiServer I made notfound.aspx an EPiServer page type, and created a page with this type in the page tree. Since IIS loads this page without any parameters I get the page id from a web.config setting, load the page from the id, and set the CurrentPage property. In ASP.NET 2.0 i set the value in the OnPreInit event, but that doesn't seem to be available in 1.1, so for 1.1 sites I use OnInit instead. The problem is that in 1.1 CurrentPage = notFoundPage does not change the value of CurrentPage. If i check CurrentPage.PageName on the next row, it is the name of the start page. In 2.0 it works just fine. Any ideas why I cannot set value for CurrentPage?
#17620
Mar 25, 2008 19:33
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.