I tried the solution in MVC5, Web API 2 and and Ninject but the package breaks my build(System.Web). I have also tried the "Ninject.MVC3" Package. When i fix it with "Update-Package -reinstall Microsoft.AspNet.WebApi.WebHost", I get the error:
An error occurred when trying to create a controller of type error: 'AnyController'. Make sure that the controller has a parameterless public constructor.
I have installed, reinstalled, uninstalled-installed all the of the packages multiple times.
My NinjectWebCommon.cs is vanilla except for the following:
private static void RegisterServices(IKernel kernel)
{
kernel.Bind<IMonitoringConfigurationService>()
.To<MonitoringConfigurationService>();
}
I Would be very grateful for any help