예제 #1
0
        public static void ProcessPageLoadException(Exception exc, string URL)
        {
            if (ThreadAbortCheck(exc))
            {
                return;
            }
            PortalSettings _portalSettings = PortalController.GetCurrentPortalSettings();

            if (!Host.UseCustomErrorMessages)
            {
                throw new PageLoadException(exc.Message, exc);
            }
            else
            {
                PageLoadException lex = new PageLoadException(exc.Message.ToString(), exc);
                CommonLibrary.Services.Log.EventLog.EventLogController objExceptionLog = new CommonLibrary.Services.Log.EventLog.EventLogController();
                objExceptionLog.AddLog(lex);
                if (!String.IsNullOrEmpty(URL))
                {
                    if (URL.IndexOf("error=terminate") != -1)
                    {
                        HttpContext.Current.Response.Clear();
                        HttpContext.Current.Server.Transfer("~/ErrorPage.aspx");
                    }
                    else
                    {
                        HttpContext.Current.Response.Redirect(URL, true);
                    }
                }
            }
        }
 public static void DeleteTabPermissionsByUser(UserInfo objUser)
 {
     provider.DeleteTabPermissionsByUser(objUser);
     CommonLibrary.Services.Log.EventLog.EventLogController objEventLog = new CommonLibrary.Services.Log.EventLog.EventLogController();
     objEventLog.AddLog(objUser, PortalController.GetCurrentPortalSettings(), UserController.GetCurrentUserInfo().UserID, "", CommonLibrary.Services.Log.EventLog.EventLogController.EventLogType.TABPERMISSION_DELETED);
     DataCache.ClearTabPermissionsCache(objUser.PortalID);
 }
예제 #3
0
        public static void ProcessModuleLoadException(string FriendlyMessage, Control ctrl, Exception exc, bool DisplayErrorMessage)
        {
            if (ThreadAbortCheck(exc))
            {
                return;
            }
            PortalSettings _portalSettings = PortalController.GetCurrentPortalSettings();

            try
            {
                if (!Host.UseCustomErrorMessages)
                {
                    throw new ModuleLoadException(FriendlyMessage, exc);
                }
                else
                {
                    IModuleControl      ctrlModule = ctrl as IModuleControl;
                    ModuleLoadException lex        = null;
                    if (ctrlModule == null)
                    {
                        lex = new ModuleLoadException(exc.Message.ToString(), exc);
                    }
                    else
                    {
                        lex = new ModuleLoadException(exc.Message.ToString(), exc, ctrlModule.ModuleContext.Configuration);
                    }
                    CommonLibrary.Services.Log.EventLog.EventLogController objExceptionLog = new CommonLibrary.Services.Log.EventLog.EventLogController();
                    objExceptionLog.AddLog(lex);
                    if (DisplayErrorMessage)
                    {
                        PlaceHolder ErrorPlaceholder = null;
                        if (ctrl.Parent != null)
                        {
                            ErrorPlaceholder = (PlaceHolder)ctrl.Parent.FindControl("MessagePlaceHolder");
                        }
                        if (ErrorPlaceholder != null)
                        {
                            ctrl.Visible             = false;
                            ErrorPlaceholder.Visible = true;
                            ErrorPlaceholder.Controls.Add(new ErrorContainer(_portalSettings, FriendlyMessage, lex).Container);
                        }
                        else
                        {
                            ctrl.Controls.Add(new ErrorContainer(_portalSettings, FriendlyMessage, lex).Container);
                        }
                    }
                }
            }
            catch (Exception exc2)
            {
                ProcessPageLoadException(exc2);
            }
        }
예제 #4
0
 public static void ProcessSchedulerException(Exception exc)
 {
     CommonLibrary.Services.Log.EventLog.EventLogController objExceptionLog = new CommonLibrary.Services.Log.EventLog.EventLogController();
     objExceptionLog.AddLog(exc, CommonLibrary.Services.Log.EventLog.EventLogController.ExceptionLogType.SCHEDULER_EXCEPTION);
 }
예제 #5
0
 public static void LogException(Exception exc)
 {
     CommonLibrary.Services.Log.EventLog.EventLogController objExceptionLog = new CommonLibrary.Services.Log.EventLog.EventLogController();
     objExceptionLog.AddLog(exc, CommonLibrary.Services.Log.EventLog.EventLogController.ExceptionLogType.GENERAL_EXCEPTION);
 }
예제 #6
0
 public static void LogException(SecurityException exc)
 {
     CommonLibrary.Services.Log.EventLog.EventLogController objExceptionLog = new CommonLibrary.Services.Log.EventLog.EventLogController();
     objExceptionLog.AddLog(exc, CommonLibrary.Services.Log.EventLog.EventLogController.ExceptionLogType.SECURITY_EXCEPTION);
 }
예제 #7
0
 public static void LogException(PageLoadException exc)
 {
     CommonLibrary.Services.Log.EventLog.EventLogController objExceptionLog = new CommonLibrary.Services.Log.EventLog.EventLogController();
     objExceptionLog.AddLog(exc, CommonLibrary.Services.Log.EventLog.EventLogController.ExceptionLogType.PAGE_LOAD_EXCEPTION);
 }
 public static void SaveTabPermissions(TabInfo objTab)
 {
     provider.SaveTabPermissions(objTab);
     EventLogController objEventLog = new EventLogController();
     objEventLog.AddLog(objTab, PortalController.GetCurrentPortalSettings(), UserController.GetCurrentUserInfo().UserID, "", CommonLibrary.Services.Log.EventLog.EventLogController.EventLogType.TABPERMISSION_UPDATED);
     ClearPermissionCache(objTab.TabID);
 }
예제 #9
0
 public static void ProcessSchedulerException(Exception exc)
 {
     CommonLibrary.Services.Log.EventLog.EventLogController objExceptionLog = new CommonLibrary.Services.Log.EventLog.EventLogController();
     objExceptionLog.AddLog(exc, CommonLibrary.Services.Log.EventLog.EventLogController.ExceptionLogType.SCHEDULER_EXCEPTION);
 }
예제 #10
0
 public static void LogException(Exception exc)
 {
     CommonLibrary.Services.Log.EventLog.EventLogController objExceptionLog = new CommonLibrary.Services.Log.EventLog.EventLogController();
     objExceptionLog.AddLog(exc, CommonLibrary.Services.Log.EventLog.EventLogController.ExceptionLogType.GENERAL_EXCEPTION);
 }
예제 #11
0
 public static void LogException(SecurityException exc)
 {
     CommonLibrary.Services.Log.EventLog.EventLogController objExceptionLog = new CommonLibrary.Services.Log.EventLog.EventLogController();
     objExceptionLog.AddLog(exc, CommonLibrary.Services.Log.EventLog.EventLogController.ExceptionLogType.SECURITY_EXCEPTION);
 }
예제 #12
0
 public static void LogException(PageLoadException exc)
 {
     CommonLibrary.Services.Log.EventLog.EventLogController objExceptionLog = new CommonLibrary.Services.Log.EventLog.EventLogController();
     objExceptionLog.AddLog(exc, CommonLibrary.Services.Log.EventLog.EventLogController.ExceptionLogType.PAGE_LOAD_EXCEPTION);
 }
예제 #13
0
 public static void ProcessPageLoadException(Exception exc, string URL)
 {
     if (ThreadAbortCheck(exc))
         return;
     PortalSettings _portalSettings = PortalController.GetCurrentPortalSettings();
     if (!Host.UseCustomErrorMessages)
     {
         throw new PageLoadException(exc.Message, exc);
     }
     else
     {
         PageLoadException lex = new PageLoadException(exc.Message.ToString(), exc);
         CommonLibrary.Services.Log.EventLog.EventLogController objExceptionLog = new CommonLibrary.Services.Log.EventLog.EventLogController();
         objExceptionLog.AddLog(lex);
         if (!String.IsNullOrEmpty(URL))
         {
             if (URL.IndexOf("error=terminate") != -1)
             {
                 HttpContext.Current.Response.Clear();
                 HttpContext.Current.Server.Transfer("~/ErrorPage.aspx");
             }
             else
             {
                 HttpContext.Current.Response.Redirect(URL, true);
             }
         }
     }
 }
예제 #14
0
 public static void ProcessModuleLoadException(string FriendlyMessage, Control ctrl, Exception exc, bool DisplayErrorMessage)
 {
     if (ThreadAbortCheck(exc))
         return;
     PortalSettings _portalSettings = PortalController.GetCurrentPortalSettings();
     try
     {
         if (!Host.UseCustomErrorMessages)
         {
             throw new ModuleLoadException(FriendlyMessage, exc);
         }
         else
         {
             IModuleControl ctrlModule = ctrl as IModuleControl;
             ModuleLoadException lex = null;
             if (ctrlModule == null)
             {
                 lex = new ModuleLoadException(exc.Message.ToString(), exc);
             }
             else
             {
                 lex = new ModuleLoadException(exc.Message.ToString(), exc, ctrlModule.ModuleContext.Configuration);
             }
             CommonLibrary.Services.Log.EventLog.EventLogController objExceptionLog = new CommonLibrary.Services.Log.EventLog.EventLogController();
             objExceptionLog.AddLog(lex);
             if (DisplayErrorMessage)
             {
                 PlaceHolder ErrorPlaceholder = null;
                 if (ctrl.Parent != null)
                 {
                     ErrorPlaceholder = (PlaceHolder)ctrl.Parent.FindControl("MessagePlaceHolder");
                 }
                 if (ErrorPlaceholder != null)
                 {
                     ctrl.Visible = false;
                     ErrorPlaceholder.Visible = true;
                     ErrorPlaceholder.Controls.Add(new ErrorContainer(_portalSettings, FriendlyMessage, lex).Container);
                 }
                 else
                 {
                     ctrl.Controls.Add(new ErrorContainer(_portalSettings, FriendlyMessage, lex).Container);
                 }
             }
         }
     }
     catch (Exception exc2)
     {
         ProcessPageLoadException(exc2);
     }
 }
예제 #15
0
 public static void LogSearchException(SearchException exc)
 {
     CommonLibrary.Services.Log.EventLog.EventLogController objExceptionLog = new CommonLibrary.Services.Log.EventLog.EventLogController();
     objExceptionLog.AddLog(exc, CommonLibrary.Services.Log.EventLog.EventLogController.ExceptionLogType.SEARCH_INDEXER_EXCEPTION);
 }
예제 #16
0
 public static void LogSearchException(SearchException exc)
 {
     CommonLibrary.Services.Log.EventLog.EventLogController objExceptionLog = new CommonLibrary.Services.Log.EventLog.EventLogController();
     objExceptionLog.AddLog(exc, CommonLibrary.Services.Log.EventLog.EventLogController.ExceptionLogType.SEARCH_INDEXER_EXCEPTION);
 }
예제 #17
0
 public static bool ChangePasswordQuestionAndAnswer(UserInfo user, string password, string passwordQuestion, string passwordAnswer)
 {
     EventLogController objEventLog = new EventLogController();
     objEventLog.AddLog(user, PortalController.GetCurrentPortalSettings(), UserController.GetCurrentUserInfo().UserID, "", CommonLibrary.Services.Log.EventLog.EventLogController.EventLogType.USER_UPDATED);
     return memberProvider.ChangePasswordQuestionAndAnswer(user, password, passwordQuestion, passwordAnswer);
 }
 public static void DeleteTabPermissionsByUser(UserInfo objUser)
 {
     provider.DeleteTabPermissionsByUser(objUser);
     CommonLibrary.Services.Log.EventLog.EventLogController objEventLog = new CommonLibrary.Services.Log.EventLog.EventLogController();
     objEventLog.AddLog(objUser, PortalController.GetCurrentPortalSettings(), UserController.GetCurrentUserInfo().UserID, "", CommonLibrary.Services.Log.EventLog.EventLogController.EventLogType.TABPERMISSION_DELETED);
     DataCache.ClearTabPermissionsCache(objUser.PortalID);
 }