c# - ASP.Net MVC Api Controller - Custom Route -
i know clone of post asp.net web api 2 route-attribute not working, having issue this.
i can use standard api routes if configure this:
// works fine config.routes.maphttproute( name: "defaultapi", routetemplate: "api/{controller}/{id}", defaults: new { id = routeparameter.optional } ); // absolutley nothing
but config.maphttpattributeroutes();
seems doing absolutely nothing. no matter have tried far helps.
has had issue?
i have tried listed routes using [route()]
attribute. nothing works.
it turned out using wrong namespace.
must use : system.web.http.routeattribute used : system.web.mvc.routeattribute
answer posted on thread referenced above - ed frenchkevin777
Comments
Post a Comment