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

后端 未结 10 2134
心在旅途
心在旅途 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:45

    What worked for me was adding the NuGet package Ninject.Web.WebApi.WebHost as described here: https://github.com/ninject/Ninject.Web.WebApi/wiki/Setting-up-an-mvc-webapi-application

提交回复
热议问题