Example #1
0
        protected void Application_Start()
        {
            //AreaRegistration.RegisterAllAreas();

            var engine = this.Engine; // Initialize CMS engine
            engine.RegisterControllers(Assembly.GetExecutingAssembly());

            var app = new WebApplication();
            app.RegisterGlobalFilters(GlobalFilters.Filters, engine);
            app.RegisterRoutes(RouteTable.Routes);
            app.RegisterComponents(engine);

            // Register custom controller factory
            ControllerBuilder.Current.SetControllerFactory(engine.Resolve<IControllerFactory>());
        }