Attribute Routing in ASP.NET Web API 2

SOS Childrensvillages asked on May 18, 2018 11:56

Hi,
we are trying to use attribute routing so we can have multiple post or get methods on the same controller. I tried adding GlobalConfiguration.Configuration.MapHttpAttributeRoutes() as per here but I end up getting my CMS 404 page. I added it to my CustomWebAPIModule's OnInit method after the call to MapHttpRoute("Default", "custom/{controller}/{id}", new { id = RouteParameter.Optional }); that's described in the documentation.

Is there a way to use attribute routing in Kentico? Convention routing keeps returning the multiple method error, though I added a mapping like so: customapi/{controller}/{action}/{id}.

Thanks in advance

Using K11, portal template model

   Please, sign in to be able to submit a new answer.