I have RoutePrefix above in my controller like:
[RoutePrefix("api/Catalogos")]
And I have method like:
[System.Web.Http.AllowAnonymous]
[System.Web.Http.HttpGet]
public HttpResponseMessage Get(HttpRequestMessage request)
{
//some code there
}
So when I use postman and send route like:
http://localhost:55720/api/Catalogos/
It runs without problems. The issue starts when I try to do another method like:
[System.Web.Http.AllowAnonymous]
[System.Web.Http.HttpGet]
[Route("GetCatalogo")]
public HttpResponseMessage GetCatalogoPadre(HttpRequestMessage request, string catalogo)
{
//some code there
}
So I try in postman url like:
http://localhost:55720/api/Catalogos/GetCatalogo/
But I get:
{ "Message": "No HTTP resource was found that matches the request URI 'http://localhost:55720/api/Catalogos/GetCatalogo/'.",
"MessageDetail": "No action was found on the controller 'Catalogos' that matches the name 'GetCatalogo'." }
Why I can´t route it? I don´t understand what is wrong there.