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