protected void Application_End(object sender, EventArgs e) { TicketBackgroundProcess.endBackground(); logger.Info("stop "); if (SchedulerProvider.Instance.Scheduler.IsStarted) { SchedulerProvider.Instance.Scheduler.Shutdown(); } }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); GlobalConfiguration.Configure(WebApiConfig.Register); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); log4net.Config.XmlConfigurator.Configure(new System.IO.FileInfo(Server.MapPath("~/Web.config"))); // configure FluentValidation model validator provider FluentValidationModelValidatorProvider.Configure(GlobalConfiguration.Configuration); TicketBackgroundProcess.startBackground(); logger.Info("TicketBackgroundProcess start"); SchedulerProvider.Instance.Init(); SchedulerProvider.Instance.Scheduler.Start(); logger.Info("Scheduler start"); }