Unity.WebApi | Make sure that the controller has a parameterless public constructor

前端 未结 6 495
独厮守ぢ
独厮守ぢ 2020-12-19 10:48

I am using the Unity.WebApi NuGet package (Unity 4.0.1 and Unity.WebApi 5.2.3) in an ASP.NET WebApi solution. The issue I am facing is that when attempting to run the code,

6条回答
  •  自闭症患者
    2020-12-19 11:34

    Set the DependencyResolver to the HttpConfiguration you created at Startup, not GlobalConfiguration.Configuration and make sure all your services constructor are public, hope this helps

提交回复
热议问题