Getting "No type was found that matches the controller named 'SampleSlashBaseService'" when trying to use WebAPI

Found the problem.

ApiControllers class names need to be suffixed with "Controller", and mine was not. Changing it to SampleSlashBaseController solved the problem.

NOTE: It is possible to suffix it with "Service" as I did, but then you have to implement a custom IHttpControllerSelector like described here: http://netmvc.blogspot.no/2012/06/aspnet-mvc-4-webapi-support-areas-in.html


You also need to make sure the Controller class is Public


In my case the Controller was defined properly, but was not marked public.