I know this is a clone of the post ASP.net web api 2 Route-Attribute not working, but I am having another issue like this.
I can use the standard api routes if i configure this:
// works just fine
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional }
);
// does absolutley nothing
but the config.MapHttpAttributeRoutes(); seems to be doing absolutely nothing. No matter what i have tried so far helps.
Has anybody had this issue?
I have tried all the listed routes using the [Route()] attribute. Nothing works.
config.MapHttpAttributeRoutes();MUST come before convention-based routes.