Ninject error in WebAPI 2.1 - Make sure that the controller has a parameterless public constructor

后端 未结 10 2133
心在旅途
心在旅途 2020-12-31 00:39

I have the following packages and their dependencies installed in my WebAPI project:

Ninject.Web.WebApi Ninject.Web.WebApi.OwinHost

10条回答
  •  不知归路
    2020-12-31 00:56

    Did you modify your OWIN Startup class to call app.UseNinjectWebApi and app.UseNinjectMiddleware rather than calling app.UseWebApi?

    Startup.cs in the Ninject Web API samples does this...

提交回复
热议问题