I have a mvc4 web application. I decided to use ninject.mvc3. so I installed it from nuget. But it is throwing this exception:
Inheritance security rules violated by type: 'Ninject.Web.Mvc.Filter.FilterContextParameter'. Derived types must either match the security accessibility of the base type or be less accessible.
private static IKernel CreateKernel()
{
var kernel = new StandardKernel(); //Throws exception this line
kernel.Bind<Func<IKernel>>().ToMethod(ctx => () => new Bootstrapper().Kernel);
kernel.Bind<IHttpModule>().To<HttpApplicationInitializationHttpModule>();
return kernel;
}
Any ideas what is causing this?