I have simple ApiController in the separate project:
<Export("Custom", GetType(ApiController)),
PartCreationPolicy(CreationPolicy.NonShared)>
Public Class CustomController
Inherits ApiController
Public Function GetSomething() As HttpResponseMessage
Dim Result As New Something() With {
.Code = "Code",
.SomeField = "Something",
.SomeField2 = 5
}
Return Request.CreateResponse(System.Net.HttpStatusCode.OK, Result)
End Function
End Class
After googlinng for a while I've managed to get to the point where controller gets resolved using custom implementations of the IHttpControllerSelector and IHttpControllerActivator. But now getting Error: "No action was found on the controller 'Custom' that matches the name 'GetSomething'"
. Means I have to implement IHttpActionSelector and probably something else afterwards... This sounds very complicated and illogical, as I'm not trying to do any custom handling. Any hints where I'm going wrong?