I have an MVC 4 app. I added a simple controller Get method that I am trying to call. I always get 404 error when I try to load the page.
HTML page that calls the method - demo.html page:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title></title></head>
<body>
<video width="480" height="320" controls="controls" autoplay="autoplay">
<source src="/vdo/?id=small.mp4" type="video/mp4" />
</video>
</body>
</html>
Controller:
public class VdoController : ApiController
{
[AllowAnonymous]
public HttpResponseMessage Get(string id)
{
if (id == null)
return new HttpResponseMessage(HttpStatusCode.BadRequest);
.....
HttpResponseMessage resp = Request.CreateResponse(HttpStatusCode.PartialContent);
.....
return resp;
}
}
Route Registration:
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(
"Vdo",
"vdo/{id}",
new { controller = "Vdo" },
new string[] { "<Namespace>.Controllers" }
);
}
What am I missing?
Here is what I see in browser:

Here is the actual error I just got in debug mode:
The controller for path '/vdo/small.mp4' was not found or does not implement IController.