protected void Application_Start() { AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); TaskConfig.Init(); BundleTable.EnableOptimizations = false; }
protected void Application_Start(object sender, EventArgs e) { Hashtable Online = new Hashtable(); base.Context.Cache.Insert("Online", Online); base.Context.Cache["count"] = 0; string SafetyVerification = ConfigHelper.GetValue("SafetyVerification"); SafetyVerification = DEncrypt.EncryptDecrypt(SafetyVerification); SafetyVerification = DEncrypt.EncryptDecrypt(SafetyVerification); try { PubFunction.ISCheckKey = bool.Parse(SafetyVerification); } catch { PubFunction.ISCheckKey = true; } if (PubFunction.ISCheckKey) { string SafetyKey = INIFile.IniReadValue("SysConfig", "license"); string[] Hardware = SafetyKey.Split(new char[] { '-' }); for (int i = 0; i < Hardware.Length; i++) { this.HardwareID.Add(i, Hardware[i].ToString()); } base.Application["HardwareID"] = this.HardwareID; } DataTable db = PubFunction.GetUserAuthority(1); for (int i = 0; i < db.Rows.Count; i++) { string f = db.Rows[i]["ActionControl"].ToString(); string h = db.Rows[i]["ActionControl"].ToString(); if (db.Rows[i]["ActionControl"].ToString() != "page" && db.Rows[i]["ActionControl"].ToString() != "module") { db.Rows[i]["ActionValue"] = "false"; } } base.Application["Authority"] = db; TaskConfig.Init(base.Server.MapPath("~")); TaskManager.Instance.Initialize(TaskConfig.ScheduleTasks); TaskManager.Instance.Start(); }