ASP.NET Web API binding with ninject

后端 未结 11 968
Happy的楠姐
Happy的楠姐 2020-12-12 22:46

I have just installed the mvc4 rc update and I am trying to build an api application with little luck.

I am using ninject but cant get my controllers to load. I keep

11条回答
  •  盖世英雄少女心
    2020-12-12 23:01

    This generic error message

    Type 'Api.Controllers.ConsumerController' does not have a default constructor

    can also occur if you do not make your constructor public, or the dependency cannot be resolved by the IoC container maybe because of a missing argument.

    The error message is misleading to say the least.

提交回复
热议问题