Thursday, October 21, 2010

How to control "Access Denied" page

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

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

No comments: