private static string InitializeApp(HttpApplication app, ref bool initialized) { var request = app.Request; var redirect = Null.NullString; Logger.Trace("Request " + request.Url.LocalPath); // Don't process some of the AppStart methods if we are installing if (!IsUpgradeOrInstallRequest(app.Request)) { // Check whether the current App Version is the same as the DB Version redirect = CheckVersion(app); if (string.IsNullOrEmpty(redirect) && !InstallBlocker.Instance.IsInstallInProgress()) { Logger.Info("Application Initializing"); // Set globals Globals.IISAppName = request.ServerVariables["APPL_MD_PATH"]; Globals.OperatingSystemVersion = Environment.OSVersion.Version; Globals.NETFrameworkVersion = GetNETFrameworkVersion(); Globals.DatabaseEngineVersion = GetDatabaseEngineVersion(); Upgrade.CheckFipsCompilanceAssemblies(); // Log Server information ServerController.UpdateServerActivity(new ServerInfo()); // Start Scheduler StartScheduler(); // Log Application Start LogStart(); // Process any messages in the EventQueue for the Application_Start event EventQueueController.ProcessMessages("Application_Start"); ServicesRoutingManager.RegisterServiceRoutes(); ModuleInjectionManager.RegisterInjectionFilters(); ConnectionsManager.Instance.RegisterConnections(); // Set Flag so we can determine the first Page Request after Application Start app.Context.Items.Add("FirstRequest", true); Logger.Info("Application Initialized"); initialized = true; } } else { // NET Framework version is neeed by Upgrade Globals.NETFrameworkVersion = GetNETFrameworkVersion(); Globals.IISAppName = request.ServerVariables["APPL_MD_PATH"]; Globals.OperatingSystemVersion = Environment.OSVersion.Version; } return(redirect); }