Search code examples
exceptionsharepoint-2010access-denied

Difference between CatchAccessDeniedException and SuppressAccessDeniedRedirectInScope in Sharepoint


Do they both do the same?

Or is there a difference in the behaviour?


Solution

  • SuppressAccessDeniedRedirectInScope is a class that implements IDisposable. The constructor stores the original value of CatchAccessDeniedException and sets the value to false to suppress the automatic redirect within the using scope. The Dispose method restores the original value of CatchAccessDeniedException.