All ASP.NET Web API controllers return 404

前端 未结 19 1702
臣服心动
臣服心动 2020-12-08 01:48

I\'m trying to get an API Controller to work inside an ASP.NET MVC 4 web app. However, every request results in a 404 and I\'m stumped. :/

I have th

19条回答
  •  无人及你
    2020-12-08 02:22

    Add following line

    GlobalConfiguration.Configure(WebApiConfig.Register);
    

    in Application_Start() function in Global.ascx.cs file.

提交回复
热议问题