Let's have a SessionController
in the main assembly of a Web API project:
public class SessionController : ApiController
{
//...
}
So far so good, now I move parts of its functionality into a general class located in another assembly:
// AnotherAssembly.dll
public class SessionControllerBase : ApiController
// Main.dll
public class SessionController : SessionControllerBase
After that the API stops working with HTTP 404 - interestingly enough, not only for SessionController, but for all other controllers in the main library as well. I've verified that both assemblies are correctly loaded into the AppDomain, though.
{
"Message": "No HTTP resource was found that matches the request URI 'http://localhost:1087/api/session'.",
"MessageDetail": "No type was found that matches the controller named 'session'."
}
When I move the base class into the main library, there are no problems whatsoever.
What am I doing wrong?