I have a problem that drives me crazy.
I have an MVC 4 WebAPI application that defines several areas.
The send controller for my job pane (SendController.cs) is defined as follows:
namespace TargetAPI.Areas.Jobs.Controllers
{
public class SendController : ApiController
{
[HttpPost]
public HttpResponseMessage Index(SendRequest req)
{
try
{
}
catch (Exception ex)
{
}
}
}
}
My job registration area (JobsAreaRegistration.cs) is defined as follows:
namespace TargetAPI.Areas.Jobs
{
public class JobsAreaRegistration : AreaRegistration
{
public override string AreaName
{
get
{
return "Jobs";
}
}
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(
"Jobs_long",
"Jobs/{controller}/{action}/{id}",
new { action = "Index", id = UrlParameter.Optional },
new[] { "TargetAPI.Areas.Jobs.Controllers" }
);
}
}
}
My RouteConfig.cs says:
namespace TargetAPI
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home",
action = "Index", id= UrlParameter.Optional },
namespaces: new string[] { "TargetAPI.Controllers" }
);
}
}
}
When I run the route debugger, I get:

(source: boomerang.com )
But when I try to post a Job / Submit message, I get:
The controller for the path '/ Jobs / Send' was not found or does not implement IController.
I tried so many iterations and combinations, I feel dizzy. Any ideas?
Thank!