I am using ASP.NET MVC 4 RC
and the latest version of MvcExtensions
and MvcExtensions.Autofac
.
I don't know if MVC 4 works differently to MVC 3, but my areas aren't displaying at all when using it with MvcExtensions. The code below is how I used it in my MVC 3 application. I have just copied and pasted it into my MVC 4 app. If I use the default Global.asax.cs file that came with the MVC 4 application then my areas display properly. Must this be done differently?
I replaced the Global.asax.cs file to look like this:
public class MvcApplication : AutofacMvcApplication
{
public MvcApplication()
{
Bootstrapper.BootstrapperTasks
.Include<RegisterAreas>()
.Include<RegisterControllers>()
.Include<RegisterRoutesBootstrapper>()
.Include<AutoMapperBootstrapper>()
.Include<FluentValidationBootstrapper>();
}
protected override void OnStart()
{
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
base.OnStart();
}
}
RegisterRoutesBootstrapper
, AutoMapperBootstrapper
and FluentValidationBootstrapper
are my custom bootstrapper classes.