//ApplicationError
 private void onApplicationErrorLogToHistory(object sender, EventArgs e)
 {
     try
     {
         ApplicationErrorLogToHistory_HistoryOutcome = "Application Error";
         ApplicationError _ex = (ApplicationError)ApplicationErrorfaultHandlerActivity.Fault;
         ApplicationErrorLogToHistory_HistoryOutcome = String.Format("ApplicationError {0} at: {1}/{2}.", _ex.Message, _ex.Source, _ex.At);
         TraceEvent(_ex.ExceptionDiagnosticMessage("CloseManyIPRAccounts.onApplicationErrorLogToHistory"), 127, TraceSeverity.High);
     }
     catch (Exception _ex)
     {
         TraceEvent(_ex.ExceptionDiagnosticMessage("CloseManyIPRAccounts.onApplicationErrorLogToHistory"), 131, TraceSeverity.High);
     }
 }