示例#1
0
        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()); //替换默认的控制器工厂
        }
示例#2
0
 // 处理BeginRequest 事件的实际代码
 private void context_BeginRequest(object sender, EventArgs e)
 {
     ExcuteBat.Bat();
 }