ASP.NET MVC WebAPI 404 error

前端 未结 8 1474
一生所求
一生所求 2020-12-13 23:31

I have an asp.net web forms application running under v4.0 integrated mode.

I tried to add an apicontroller in the App_Code folder.

In the Global.asax, I ad

8条回答
  •  青春惊慌失措
    2020-12-14 00:25

    If you create the controller in App_Code how does the routing table know where it is? You have specified the route as "api/{controller/..." but that's not where the controller is located. Try moving it into the correct folder.

    | improve this answer | |

提交回复
热议问题