protected void Application_Start() { AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); AutoFacConfig.BuiderIocContainer(); //CustomError.LoadLog4Config(); Task.Run(() => { for (int i = 0; i < SchedulerData.schedulerInstanceIdEquivalentIp.Count; i++) { var schedulerInstanceId = SchedulerData.schedulerInstanceIdEquivalentIp.ElementAt(i).Key; var scheduler = SchedulerManager.ConnectionCache[schedulerInstanceId]; if (scheduler != null) { if (scheduler.IsShutdown) { //发送邮件 //更新服务异常信息 } } } }); var db = new DbContext(); db.Db.DbFirst.CreateClassFile(@"E:\TaskManagerByQuartz.Net\Quartz.Net_Model\Models1"); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); AutoFacConfig.BuiderIocContainer(); //CustomerLog.LoadLog4Config(); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); GlobalConfiguration.Configure(WebApiConfig.Register); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); AutoFacConfig.BuiderIocContainer(); GlobalConfiguration.Configuration.Filters.Add(new CustomExceptionAttribute()); log4net.Config.XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo(Server.MapPath("/Configs/log4net.config"))); DbInterception.Add(new DataBaseLogger()); CustomExceptionAttribute.Dequeue <Exception>(x => { Log.Error(x, Log.LogError); }); }