Exemplo n.º 1
0
        private void Application_Start(object sender, EventArgs e)
        {
            EcpEventLogConstants.Tuple_EcpStarted.LogEvent(new object[]
            {
                AppDomain.CurrentDomain.FriendlyName
            });
            if (!Util.IsDataCenter)
            {
                ServiceDiscovery.ADNotificationScope = ExchangeTopologyScope.ADAndExchangeServerAndSiteAndVirtualDirectoryTopology;
            }
            Globals.InitializeMultiPerfCounterInstance("ECP");
            foreach (ExPerformanceCounter exPerformanceCounter in EcpPerfCounters.AllCounters)
            {
                exPerformanceCounter.RawValue = 0L;
            }
            using (Process currentProcess = Process.GetCurrentProcess())
            {
                EcpPerfCounters.PID.RawValue = (long)currentProcess.Id;
            }
            ADSession.DisableAdminTopologyMode();
            BaseSprite.IsDataCenter      = Util.IsMicrosoftHostedOnly;
            BaseSprite.GetSpriteImageSrc = new GetSpriteImageSrcDelegate(Util.GetSpriteImageSrc);
            VirtualDirectoryConfiguration.EcpVirtualDirectoryAnonymousAuthenticationEnabled = VirtualDirectoryConfiguration.GetEcpAnonymousAuthenticationStatus();
            string identification = ConfigurationManager.AppSettings["ProvisioningCacheIdentification"];

            ProvisioningCache.InitializeAppRegistrySettings(identification);
            this.InvokeExtendedApplicationStart(sender, e);
            ScriptManager.ScriptResourceMapping.AddDefinition("MicrosoftAjax.js", new ScriptResourceDefinition
            {
                Path      = ThemeResource.ScriptPath + "microsoftajax.js",
                DebugPath = ThemeResource.ScriptPath + "microsoftajax.debug.js"
            });
        }
        // Token: 0x0600115D RID: 4445 RVA: 0x00042A40 File Offset: 0x00040C40
        private static void InitializeApplicationCaches()
        {
            HttpContext     httpContext         = HttpContext.Current;
            HttpApplication applicationInstance = httpContext.ApplicationInstance;

            ADIdentityInformationCache.Initialize(4000);
            applicationInstance.Application["WS_APPWideMailboxCacheKey"] = new AppWideStoreSessionCache();
            applicationInstance.Application["WS_AcceptedDomainCacheKey"] = new AcceptedDomainCache();
            int maxThreadCount = 10 * Environment.ProcessorCount;

            Global.BudgetType = BudgetType.Owa;
            Global.BulkOperationBudgetType           = BudgetType.OwaBulkOperation;
            Global.NonInteractiveOperationBudgetType = BudgetType.OwaNonInteractiveOperation;
            Global.NonInteractiveThrottlingEnabled   = true;
            Global.NonInteractiveOperationMethods    = OwaApplication.owaNonInteractiveMethodNames;
            UserWorkloadManager.Initialize(maxThreadCount, 500, 500, TimeSpan.FromMinutes(5.0), null);
            applicationInstance.Application["WS_WorkloadManagerKey"] = UserWorkloadManager.Singleton;
            OwaEventRegistry owaEventRegistry = new OwaEventRegistry();

            owaEventRegistry.RegisterHandler(typeof(PendingRequestEventHandler));
            applicationInstance.Application["OwaEventRegistry"] = owaEventRegistry;
            string identification = ConfigurationManager.AppSettings["ProvisioningCacheIdentification"];

            ProvisioningCache.InitializeAppRegistrySettings(identification);
        }
 protected virtual void EnableProvisioningCache()
 {
     if (this.anchorContext.Settings.UseHeatMapProvisioning)
     {
         this.logger.Log(MigrationEventType.Verbose, "Initializing local forest heat map cache.", new object[0]);
         this.anchorContext.InitializeForestHeatMap();
     }
     else
     {
         this.logger.Log(MigrationEventType.Verbose, "Enabling provisioning cache.", new object[0]);
         ProvisioningCache.InitializeAppRegistrySettings("Powershell");
     }
     if (this.anchorContext.Settings.BuildLocalCacheOnStartup)
     {
         this.anchorContext.InitializeLocalServerHeatMap();
     }
 }
Exemplo n.º 4
0
 private static void InitializeAuthZPluginForRemotePS(string connectionUri)
 {
     if (AppSettings.RpsAuthZAppSettingsInitialized)
     {
         return;
     }
     AppSettings.InitializeManualLoadAppSettings(connectionUri, delegate
     {
         IAppSettings appSettings = AppSettings.Current;
         if (appSettings.SupportedEMCVersions == null)
         {
             ((ManualLoadAppSettings)appSettings).SupportedEMCVersions = SupportedVersionList.DefaultVersionString;
         }
         AppDomain.CurrentDomain.SetupInformation.ConfigurationFile = appSettings.ConfigurationFilePath;
         ConfigFiles.SetConfigSource(appSettings.VDirName, appSettings.WebSiteName);
         FailFastUserCache.FailFastEnabled = appSettings.FailFastEnabled;
         Uri uri = new Uri(connectionUri, UriKind.Absolute);
         ExchangeAuthorizationPlugin.InitializeExchangeAuthZPluginPerfCounter(appSettings.VDirName, uri.Port);
         ProvisioningCache.InitializeAppRegistrySettings(appSettings.ProvisioningCacheIdentification);
         ThreadPool.SetMaxThreads(appSettings.ThreadPoolMaxThreads, appSettings.ThreadPoolMaxCompletionPorts);
         ThrottlingPerfCounterWrapper.Initialize(BudgetType.PowerShell);
         ADSession.DisableAdminTopologyMode();
     });
 }
Exemplo n.º 5
0
 private void Application_Start(object sender, EventArgs e)
 {
     this.InitializePerformanceCounter();
     this.InitDirectoryTopologyMode();
     ProvisioningCache.InitializeAppRegistrySettings(((IAppSettings)PswsAppSettings.Instance).ProvisioningCacheIdentification);
 }