Do they both do the same?
Or is there a difference in the behaviour?
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
.