コード例 #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);
                    }
                }
            }
        }
コード例 #2
0
 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);
 }
コード例 #8
0
 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);
 }
コード例 #18
0
 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);
 }