-
Notifications
You must be signed in to change notification settings - Fork 40
Description
Hi,
I have a Project, where I am using the following Ninject Components:
with this Confoguration everything works fine
<package id="Ninject" version="3.2.2.0" targetFramework="net40" />
<package id="Ninject.MVC4" version="3.2.1.0" targetFramework="net40" />
<package id="Ninject.Web.Common" version="3.2.1.0" targetFramework="net40" />
<package id="Ninject.Web.Common.WebHost" version="3.2.1.0" targetFramework="net40" />
When I update the Ninject.Web.Common to:
<package id="Ninject.Web.Common" version="3.2.2.0" targetFramework="net40" />
I get the following Error, when I am calling the Website:
Error loading Ninject component ICache
No such component has been registered in the kernel's component container.
Suggestions:
- If you have created a custom subclass for KernelBase, ensure that you have properly
implemented the AddComponents() method. - Ensure that you have not removed the component from the container via a call to RemoveAll().
- Ensure you have not accidentally created more than one kernel.
Beschreibung: Unbehandelte Ausnahme beim Ausführen der aktuellen Webanforderung. Überprüfen Sie die Stapelüberwachung, um weitere Informationen über diesen Fehler anzuzeigen und festzustellen, wo der Fehler im Code verursacht wurde.
Ausnahmedetails: System.InvalidOperationException: Error loading Ninject component ICache
No such component has been registered in the kernel's component container.
Suggestions:
- If you have created a custom subclass for KernelBase, ensure that you have properly
implemented the AddComponents() method. - Ensure that you have not removed the component from the container via a call to RemoveAll().
- Ensure you have not accidentally created more than one kernel.
Quellfehler:
Beim Ausführen der aktuellen Webanforderung wurde einen unbehandelte Ausnahme generiert. Informationen über den Ursprung und die Position der Ausnahme können mit der Ausnahmestapelüberwachung angezeigt werden.
Stapelüberwachung:
[InvalidOperationException: Error loading Ninject component ICache
No such component has been registered in the kernel's component container.
Suggestions:
- If you have created a custom subclass for KernelBase, ensure that you have properly
implemented the AddComponents() method. - Ensure that you have not removed the component from the container via a call to RemoveAll().
- Ensure you have not accidentally created more than one kernel.
]
Ninject.Components.ComponentContainer.Get(Type component) +425
Ninject.Components.ComponentContainer.Get() +50
Ninject.Web.Common.<>c__DisplayClass2.b__1(IKernel kernel) +58
Ninject.GlobalKernelRegistration.MapKernels(Action`1 action) +172
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +165
My NinjectWebCommon.cs looks like:
/// <summary>
/// Load your modules or register your services here!
/// </summary>
/// <param name="kernel">The kernel.</param>
private static void RegisterServices(IKernel kernel)
{
//Mvc Skeleton Bindings laden
kernel.Load(new Internal.MvcSkeleton.Gui.Mvc.NinjectBindings());
//Home Controller Bindings
kernel.Bind<IRechnungsmonitorDashboardViewModelBuilder>().To<RechnungsmonitorDashboardViewModelBuilder>().InRequestScope();
kernel.Bind<IOverviewModelBuilder>().To<OverviewModelBuilder>().InRequestScope();
kernel.Bind<ISearchModelBuilder>().To<SearchModelBuilder>().InRequestScope();
kernel.Bind<IMantisDashboardViewModelBuilder>().To<MantisDashboardViewModelBuilder>().InRequestScope();
....
If you need more Informations please tell me
thx
squadwuschel