I have the following packages and their dependencies installed in my WebAPI project:
Ninject.Web.WebApi
Ninject.Web.WebApi.OwinHost
For me, what caused this error was that for the interface I was passing into the constructor, I had a named binding and I called it with the wrong name. As you can see the below, the binding says it's named "Warehouse", but I got things mixed up and put "DataWarehouse" in the constructor. Getting this straightened out caused the error about a parameterless constructor to go away.
private static void RegisterServices(IKernel kernel)
{
kernel.Bind().To().InThreadScope();
kernel.Bind().To().InThreadScope();
kernel.Bind().To().Named("Warehouse").WithConstructorArgument("connectionString", ConfigurationManager.ConnectionStrings["DataWarehouse"].ConnectionString);
}
constructor:
//WRONG NAME
public VisitProcessor([Named("DataWarehouse")] IDbConnectionFactory connection)
{
_database = connection;
}