In my ASP.NET Web API project, I have the following routing defined in Global.asax:
routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "{controller}/{action}"
);
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}"
);
I have a controller called UserFeedController with an action with the following signature:
public UserFeedResponseViewModel GetUserFeed(int id)
When I enter the url http://api.mydomain.com/UserFeed/GetUserFeed/4 I get a 404. Why doesn't the second routing rule apply?
MVC routing is quite beyond my power to comprehend.