Hi,
This is how my Application_Start looks:
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
RegisterGlobalFilters(GlobalFilters.Filters);
RegisterRoutes(RouteTable.Routes);
_container.Register(Component.For<IWindsorContainer>()
.Instance(_container),
Component.For<IView, IViewPageActivator>()
.ImplementedBy<RazorView>(),
Component.For<IFilterProvider>()
.ImplementedBy<WindsorFilterAttributeFilterProvider>(),
Component.For<IControllerFactory>()
.ImplementedBy<WindsorControllerFactory>(),
Component.For<ControllerContext>()
.ImplementedBy<ControllerContext>()
);
_container.Register(
AllTypes.Of<IController>()
.FromAssembly(Assembly.GetExecutingAssembly())
.Configure(c => c.LifeStyle.Transient)
);
Yet when trying to run the solution I get the following error:
Can't create component 'System.Web.Mvc.RazorView' as it has dependencies to be satisfied.
System.Web.Mvc.RazorView is waiting for the following dependencies:
Keys (components with specific keys)
- viewPath which was not registered.
- layoutPath which was not registered.
- runViewStartPages which was not registered.
- viewStartFileExtensions which was not registered.
How do I setup the container such that it can get the required information dynamically at run time? As I assume at the very least viewPath will change for each Controller.