I am working on WebApplication that uses MVC5 and WebApi 2 with Owin. I recently updated Microsoft Asp.Net NuGet packages (Microsoft.AspNet.Mvc, etc.) from version 5.2.2 to 5.2.3, as well as Owin NuGet packages (Microsoft.Owin, etc.) From 3.0.0 to 3.0.1, I also updated Microsoft.AspNet.Identity.Owin from version 2.1.0 to version 2.2.0
Then I updated the corresponding Ninject WebApi packages (Ninject.Web.WebApi, etc.) from 3.2.3 to version 3.2.4 to get it to compile, but did not update Ninject.Web.Common.OwinHost, as it was in the latest version (3.2.3).
When I try to run the application, I get the following error:
Error loading the Ninject ICache component. This component was not registered in the kernel component container.
Suggestions:
1) If you created a custom subclass for KernelBase, make sure you correctly use the AddComponents () method.
2) Make sure that you did not remove the component from the container by calling RemoveAll ().
3) Make sure that you do not accidentally create multiple cores.
The kernel that I create in the OwinStartup class used is removed from the Owin.AppBuilderExtensions.CreateOwinContext () method, which indirectly refers to OwinBootstrapper.Execute ().
It just started by upgrading Asp.Net NuGet packages to 5.2.3. Before updating packages, OwinBootstrapper.Execute () is still called but does not call Owin.AppBuilderExtensions.CreateOwinContext () or KernelBase.Dispose ().
OwinStartup, Ninject Kernel :
public virtual void Configuration(IAppBuilder app)
{
app.UseNinjectMiddleware(CreateKernel);
app.CreatePerOwinContext(CreateKernel);
}
NuGet , , , - Microsoft.AspNet.Identity.Owin - 2.2.0. Ninject AspNet.Identity.Owin 2.2 +0,0?