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…
It really was a NInject.dll issue. I was using .NET 4.5 earlier and the web host had .NET 4.5. So I switched my application to .NET 4.0. I later picked up a NInject.dll from an application which was already running and replaced it current application’s dll and it worked.