public static void PreStart() { _factory = ControllerBuilder.Current.GetControllerFactory(); var engine = MvcEngine.Create(); _cmsFactory = ControllerBuilder.Current.GetControllerFactory(); RouteTable.Routes.MapContentRoute("Content", engine); }
protected void Application_Start(object sender, EventArgs e) { // normally the engine is initialized by the initializer module but it can also be initialized this programmatically // since we attach programmatically we need to associate the event broker with a http application var engine = MvcEngine.Create(); engine.RegisterControllers(typeof(GlobalApplication).Assembly); RegisterRoutes(RouteTable.Routes, engine); }