更新时间:2021-11-23 21:38:54
这另一个潜在原因是,如果
Another potential reason for this is if the
GlobalConfiguration.Configure(WebApiConfig.Register);
是在
RouteConfig.RegisterRoutes(RouteTable.Routes);
在的global.asax.cs
in global.asax.cs
它需要之前,否则默认RouteConfig路线'吃'的路线的WebAPI - 并试图映射API请求到一个控制器称为API ...
It needs to be before, otherwise the default RouteConfig route 'eats' the WebAPI route - and attempts to map API requests to a controller called API...