예제 #1
0
        protected void Application_Start()
        {
            if (ConfigurationManager.AppSettings["Profiler"].ToString() == "true")
            {
                MiniProfilerEF6.Initialize();
            }

            //set controller factory for generic controller
            ControllerBuilder.Current.SetControllerFactory(typeof(My_Controller_Factory));
            DbConfig.InitDB();
            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            AttributeConfig.RegisterGlobalAttribute();
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            CustomViewEngine.RegisterViewEngine(ViewEngines.Engines);
            ModelMetadataProviders.Current = new MyLocalizationProvider();
            ModelBinders.Binders.Add(typeof(AbstractPage), new AbstractPageBinder());
            TasksConfig.StartTasks();
            SF.EvaluateDisplayMode();
        }