0

I am using attribute routes to route actions in controllers, but asp.net generate wrong Help Page

[HttpGet]
[Route("getAll")]
[AllowAnonymous]
public IHttpActionResult GetCategories(){...}

But the result is enter image description here

1 Answers1

0

Set up your config to use attribute routing.

public static class WebApiConfig
{
    public static void Configure(HttpConfiguration configuration)
    {
        //the following config sets up your routing mechanism to use attributes
        configuration.MapHttpAttributeRoutes();
    }
}
Petre T
  • 472
  • 5
  • 12