コード例 #1
0
        // Token: 0x0600025A RID: 602 RVA: 0x0000FCC4 File Offset: 0x0000DEC4
        private void Application_Start(object sender, EventArgs e)
        {
            Globals.InitializeMultiPerfCounterInstance("AutoDisc");
            Microsoft.Exchange.Diagnostics.Components.Autodiscover.ExTraceGlobals.FrameworkTracer.TraceDebug <string>((long)this.GetHashCode(), "[Application_Start()] Privileges.RemoveAllExcept(,,\"{0}\");", "MSExchangeAutodiscoverAppPool");
            string[] privilegesToKeep = new string[]
            {
                "SeAuditPrivilege",
                "SeChangeNotifyPrivilege",
                "SeCreateGlobalPrivilege"
            };
            int num = Privileges.RemoveAllExcept(privilegesToKeep, "MSExchangeAutodiscoverAppPool");

            if (num != 0)
            {
                Microsoft.Exchange.Diagnostics.Components.Autodiscover.ExTraceGlobals.FrameworkTracer.TraceError <TimeSpan, int>((long)this.GetHashCode(), "[Application_Start()] 'Failed to remove privileges, exiting. Time=\"{0}\",win32Error=\"{1}\"'", ExDateTime.Now.TimeOfDay, num);
                Environment.Exit(num);
            }
            PerformanceCounters.Initialize();
            ExchangeDiagnosticsHelper.RegisterDiagnosticsComponents();
            Microsoft.Exchange.Diagnostics.Components.Autodiscover.ExTraceGlobals.FrameworkTracer.TraceDebug((long)this.GetHashCode(), "[Application_Start()] 'ApplicationStarted'");
            Common.EventLog.LogEvent(AutodiscoverEventLogConstants.Tuple_InfoWebApplicationStart, Common.PeriodicKey, new object[0]);
            string text = ExEnvironment.IsTest ? "E12" : "E12IIS";

            ExWatson.Register(text);
            Microsoft.Exchange.Diagnostics.Components.Autodiscover.ExTraceGlobals.FaultInjectionTracer.RegisterExceptionInjectionCallback(new ExceptionInjectionCallback(FaultInjection.Callback));
            Microsoft.Exchange.Diagnostics.Components.Autodiscover.ExTraceGlobals.FrameworkTracer.TraceDebug <string, string>((long)this.GetHashCode(), "[Application_Start()] ExWatson.Register(\"{0}\");AppName=\"{1}\";", text, ExWatson.AppName);
        }
コード例 #2
0
 public void RegisterDatabaseManager(DatabaseManager databaseManager)
 {
     if (!this.registered && databaseManager != null)
     {
         this.databaseManager = databaseManager;
         ExchangeDiagnosticsHelper.RegisterDiagnosticsComponents(this);
         this.registered = true;
     }
 }
コード例 #3
0
 // Token: 0x0600025E RID: 606 RVA: 0x00010098 File Offset: 0x0000E298
 private void Application_End(object sender, EventArgs e)
 {
     try
     {
         ExchangeDiagnosticsHelper.UnRegisterDiagnosticsComponents();
     }
     finally
     {
         RequestDetailsLogger.FlushQueuedFileWrites();
         Microsoft.Exchange.Diagnostics.Components.Autodiscover.ExTraceGlobals.FrameworkTracer.TraceDebug((long)this.GetHashCode(), "[Application_End()] 'Autodiscover service stopped'");
         Common.EventLog.LogEvent(AutodiscoverEventLogConstants.Tuple_InfoWebApplicationStop, Common.PeriodicKey, new object[]
         {
             "Autodiscover service stopped"
         });
     }
 }
コード例 #4
0
ファイル: Global.cs プロジェクト: YHZX2013/exchange_diff
 private void ExecuteApplicationEnd(object sender, EventArgs e)
 {
     ADNotificationManager.Stop();
     DeviceClassCache.Instance.Stop();
     ADUserCache.Stop();
     MailboxSessionCache.Stop();
     DeviceBehaviorCache.Stop();
     ExchangeDiagnosticsHelper.UnRegisterDiagnosticsComponents();
     this.resetAutoBlockedDeviceCounterTimer.Dispose();
     GlobalSettings.SyncLog.Dispose();
     using (Process currentProcess = Process.GetCurrentProcess())
     {
         AirSyncDiagnostics.LogEvent(AirSyncEventLogConstants.Tuple_AirSyncUnloaded, new string[]
         {
             currentProcess.Id.ToString(CultureInfo.InvariantCulture)
         });
     }
 }