I have a problem with Ninject that I have not seen before and do not know how to fix. I am using MVC NuGet package for MVC 5.
In my NinjectWebCommon.cs there is the following method:
public static void Start()
{
DynamicModuleUtility.RegisterModule(typeof(OnePerRequestHttpModule));
DynamicModuleUtility.RegisterModule(typeof(NinjectHttpModule));
bootstrapper.Initialize(CreateKernel);
}
However, when he tries to execute the last line, he crashes, complaining that "the sequence contains no elements." I previously used Unity for DI, but changed it to Ninject.
Any ideas?
Thanks in advance, M
source
share