/* ============================================================================================================ static handlers */ protected static void ApplicationStartHandler(object sender, EventArgs e, HttpApplication application) { var runOnceMarkerPath = application.Server.MapPath("/" + RunOnceGuid); var firstRun = File.Exists(runOnceMarkerPath); var startConfig = new SenseNet.ContentRepository.RepositoryStartSettings { StartLuceneManager = !firstRun }; RepositoryInstance.WaitForWriterLockFileIsReleased(RepositoryInstance.WaitForLockFileType.OnStart); Repository.Start(startConfig); //-- <L2Cache> StorageContext.L2Cache = new L2CacheImpl(); //-- </L2Cache> RegisterRoutes(RouteTable.Routes); RepositoryPathProvider.Register(); //Database.SetInitializer(new InDocContextInitializer()); //using (var context = DependencyResolver.Current.GetService<InDocContext>()) //{ // context.Database.Initialize(false); //} //preload WarmUp.Preload(); }
protected virtual void Application_Start(object sender, EventArgs e, HttpApplication application) { var runOnceMarkerPath = application.Server.MapPath("/" + RunOnceGuid); var firstRun = File.Exists(runOnceMarkerPath); var startConfig = new SenseNet.ContentRepository.RepositoryStartSettings { StartLuceneManager = !firstRun }; RepositoryInstance.WaitForWriterLockFileIsReleased(RepositoryInstance.WaitForLockFileType.OnStart); Repository.Start(startConfig); //-- <L2Cache> StorageContext.L2Cache = new L2CacheImpl(); //-- </L2Cache> RegisterRoutes(RouteTable.Routes, application); RepositoryPathProvider.Register(); //preload WarmUp.Preload(); }
protected override void Application_Start(object sender, EventArgs e, HttpApplication application) { base.Application_Start(sender, e, application); WarmUp.Preload(); }