I am also having an error crop up involving the ICache component, but
I am not using the NuGet MVC3 bootstrapper and I am not using
WebActivator. I did install Ninject itself from NuGet. I am using my
own controller factory to call the Ninject kernel. Everything works
fine for individual requests, but when I load test the application,
every request starts failing after a couple minutes with the ICache
error. The exception being thrown by Ninject is included below. None
of the suggestions seem to apply to my scenario. The Kernel is
created as a static in my Application_Start, so there should only be
one instance. Thanks for any assistance you can provide.
-Nick Slowes
System.InvalidOperationException: Error loading Ninject component
ICache
No such component has been registered in the kernel's component
container.
Suggestions:
1) If you have created a custom subclass for KernelBase, ensure that
you have properly
implemented the AddComponents() method.
2) Ensure that you have not removed the component from the container
via a call to RemoveAll().
3) Ensure you have not accidentally created more than one kernel.
at Ninject.Components.ComponentContainer.Get(Type component) in d:
\BuildAgent-01\work\b68efe9aafe8875e\src\Ninject\Components
\ComponentContainer.cs:line 131
at Ninject.Components.ComponentContainer.Get[T]() in d:
\BuildAgent-01\work\b68efe9aafe8875e\src\Ninject\Components
\ComponentContainer.cs:line 102
at Ninject.KernelBase.CreateContext(IRequest request, IBinding
binding) in d:\BuildAgent-01\work\b68efe9aafe8875e\src\Ninject
\KernelBase.cs:line 540
at
System.Linq.Enumerable.<>c__DisplayClass12`3.<CombineSelectors>b__11(TSource
x)
at
System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1
source)
at Ninject.ResolutionExtensions.TryGet[T](IEnumerable`1 iterator)
in d:\BuildAgent-01\work\b68efe9aafe8875e\src\Ninject\Syntax
\ResolutionExtensions.cs:line 270
at
MetadataService.NinjectControllerFactory.CreateController(RequestContext
requestContext, String controllerName) in C:\Users\nslowes\Documents
\HG Code\CollectionServices\MetadataService
\NinjectControllerFactory.cs:line 28
at System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase
httpContext, IController& controller, IControllerFactory& factory)
at
System.Web.Mvc.MvcHandler.<>c__DisplayClass6.<BeginProcessRequest>b__2()
at
System.Web.Mvc.SecurityUtil.<>c__DisplayClassb`1.<ProcessInApplicationTrust>b__a()
at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust[TResult]
(Func`1 func)
at
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
Boolean& completedSynchronously)