How to check if a not published page is published without being redirected to login page

Hi all There probably is a fairly simple solution to this problem: Im trying to check if a page is published, but whenever i do GetPage(...) on a page that is not published the users (who lack permissions) is redirected to the login page. To put this is code: PageData objPage = GetPage(objPageReference); if (objPage.CheckPublishedStatus(PagePublishedStatus.Published)){ [...] } I never get past GetPage because the user is redirected, so how am i supposed to be able to do this check? Regards /Fredrik
Nov 08, 2005 13:46
You might try GetPage(objPageReference, EPiServer.Security.AccessControlList.NoAccess); which will skip the authorization control. Regards, Johan Olofsson ElektroPost
Nov 08, 2005 14:38
Thanks a bunch, that did the trick. objPage = Global.EPDataFactory.GetPage(objPageReference, EPiServer.Security.AccessControlList.NoAccess); /Fredrik
Nov 08, 2005 16:02
* 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.