I have a web application which uses both MVC and WebAPI2. I would like for requests to always be matched up with WebAPI2 attribute routes before matching manually configured MVC routes. I have tried calling configuration.MapHttpAttributeRoutes() before I call RouteConfig.RegisterRoutes(RouteTable.Routes) but this does not seem to work.
Is there any way to ensure the WebAPI2 routes will always have precedence?
Ensure that WebAPI2 routes are matched before MVC Routes