Tip #75: How to control "Access Denied" page

Rate this item
(0 votes)

The SPUtility.HandleAccessDenied method provides the functionality to redirect users to the standard "Access Denied Page" pragmatically, thus asking them to re-logon. One of the scenarios of such usage is the public sites, where access to the standard SharePoint specific pages still exists and you want to block those pages (source)

However, you can handle access denied exception via SPSecurity.CatchAccessDeniedException = true (source)

Leave a comment

Make sure you enter the (*) required information where indicated. HTML code is not allowed.