Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

AccessDeniedException & OnError

Vote:
 

Hello,

I have made a generic error handling on our site, with an overrided OnError method in the base page we use. So far so good. Now to the problem. For some cases of the AccessDeniedException I want to display a more specific error message. To determine for what cases I want to check the ACL of the page that the user couldn't access. If a certain role has access to this page I want to display a different access denied message than for other access denied pages.

How do I get the PageData object that the access was denied to? CurrentPage won't work. And the AccessDeniedException.PageLink is null...

#39353
May 12, 2010 12:49
* 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.