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); }
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); } }
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); }
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); }
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); }
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); }
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 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); } }
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); }
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); }