I have created a very simple
ASP.NET MVC 2 application that can
reproduce my problem (only 14kb), in this address:
http://dl.dropbox.com/u/3888891/CobaNinject.zip
There is only one controller, HomeController, and one action, Index.
This controller has two constructors, one parameterless, the other has
one parameter. The data type of the parameter is an interface. I have
bound this interface to a concrete class in ninject kernel. The
problem is, this constructor with one parameter never gets called.
If I remove the parameterless constructor, it throws an error, "No
parameterless constructor defined for this object."
I have tried putting 'inject' attribute on the constructor with one
parameter, but no changes.
How do I setup ninject so it will call my constructor with one
parameter?