Trying to upgrade a project from MVC3to MVC5, the 3->4 part went well and I could run the project.
However, after updating probably everything for mvc5, I'm getting an exception
Inheritance security rules violated by type: 'Autofac.Integration.Web.Mvc.AutofacControllerFactory'. Derived types must either match the security accessibility of the base type or be less accessible.
on this row of Application_Start()
InitContainerProvider();
the method being called:
protected void InitContainerProvider()
{
var builder = new ContainerBuilder();
builder.RegisterControllers(Assembly.GetExecutingAssembly());
builder.RegisterType<PeriodsProxy>().As<IPeriods>().AsWcfProxy();
_containerProvider = new ContainerProvider(builder.Build());
var factory = new AutofacControllerFactory(_containerProvider);
ControllerBuilder.Current.SetControllerFactory(factory);
}