I guess this explodes here:
return (IController)kernel.Resolve(controllerType);
What you are asking the castle to do here in English is "give me a component that implements a service defined using the type of controller."
The problem occurs when registering your controllers.
container.Register( Types.FromThisAssembly() .BasedOn(typeof(BaseController)) .WithServices(typeof(BaseController)) .LifestyleTransient());
In this block, you force the lock to register all your types that implement BaseController, and the services they expose are also BaseController.
So, the lock is looking for a component that satisfies the HomeController service and cannot find anything, because your only service is BaseController.
In short, if you delete
.WithServices(typeof(BaseController))
The lock will assume that each of your controllers is a service, and then you can request components that implement your controller the way you want.
As a separate note, for clarity, I would change Types.FromThisAssembly () to Classes.FromThisAssembly (), because you are only looking for classes, not stucts / classes / interfaces, etc. that will scan types.
source share