protected void Application_Start() { AreaRegistration.RegisterAllAreas(); GlobalConfiguration.Configure(WebApiConfig.Register); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); ExcuteBat.Bat(); //启动es2.4.2服务 Database.SetInitializer <DbContextEntity>(null); ControllerBuilder.Current.SetControllerFactory(new UnityControllerFactory()); //替换默认的控制器工厂 }
// 处理BeginRequest 事件的实际代码 private void context_BeginRequest(object sender, EventArgs e) { ExcuteBat.Bat(); }