Example #1
0
        protected void Application_EndRequest(object sender, EventArgs e)
        {
            var accessError = HttpContext.Current?.Response?.Headers[nameof(SecurityException)];

            if (!string.IsNullOrWhiteSpace(accessError))
            {
                BaseViewPage <int> .SendSecurityErrorReponse(accessError);
            }
        }
Example #2
0
 private void UserAccessCheck()
 {
     try
     {
         EventsHub.RaiseUserAuthenticating(HttpContext.Current.User.Identity.Name);
     }
     catch (Exception e)
     {
         BaseViewPage <int> .SendSecurityErrorReponse(e.InnerException == null?e.Message : e.InnerException.Message);
     }
 }