protected override void ThrowAuthorizationException(string errorMsg)
{
try
{
HttpContext.Current.Response.StatusCode = (int)HttpStatusCode.Forbidden;
}
// ReSharper disable once EmptyGeneralCatchClause
catch
{
// No biggy if status code has already been written, we can skip this.
}
base.ThrowAuthorizationException(errorMsg);
}