I have an ASP.NET MVC 3 application. It runs successfully on my local machine, using IIS Express under Visual Studio 2012 RC.
But It doesn't seem to run on my server/host. I get the following error:
Error activating HomeController using implicit self-binding of HomeController No constructor was available to create an instance of the implementation type.
Activation path:
- Request for HomeController
Suggestions:
Ensure that the implementation type has a public constructor.
If you have implemented the Singleton pattern, use a binding with InSingletonScope() instead.
I have searched all over web, couldn't find a solution. It looks its an error because I don't have a constructor defined or have private constructor in my HomeController, but this is not the case.
I have NInject.dll in bin folder..
Can't figure out...
I had trouble with this same issue with NInject and didn't read the whole message.
MAKE SURE YOUR CONSTRUCTOR IS PUBLIC
mine was protected. Hope that saves someone else time :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With