I've a strange question for you. I have to fix bugs in the another's code (webpart for sharepoint 2010). So in the code there is a line with the code below:
var s = (String)((PersonalWebPartPage)Page).Profile["AccountName"];
and then I tried to view next error appears:
Unable to cast object of type 'ASP._layouts_wpprevw_aspx' to type 'Microsoft.SharePoint.Portal.WebControls.PersonalWebPartPage'.
But this code somehow working on the corporate portal. What it can be? =) Or maybe I've missing some references?