Can't get Ninject to dispose object in Request Scope

后端 未结 1 1968
独厮守ぢ
独厮守ぢ 2021-01-13 15:41

I can\'t seem to get Ninject to dispose objects in request scope in an ASP.NET MVC application with web API no matter what I do.

What I am doing:

  • Creat
相关标签:
1条回答
  • 2021-01-13 16:22

    The object not being disposed was a problem in Ninject.Web.Common before version 3.2.2, as discussed here: InRequestScope is failing to dispose objects

    As you have been installing Ninject via nuget, you probably installed the oldest supported dependencies. This can be avoided by using:

    Install-Packages Ninject.MVC5 -DependencyVersion Highest
    

    Please verify that you are using the current version of all Ninject packages.

    0 讨论(0)
提交回复
热议问题