All ASP.NET Web API controllers return 404

前端 未结 19 1647
臣服心动
臣服心动 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:27

    I have dozens of installations of my app with different clients which all worked fine and then this one just always returned 404 on all api calls. It turns out that when I created the application pool in IIS for this client it defaulted to .net framework 2.0 instead of 4.0 and I missed it. This caused the 404 error. Seems to me this should have been a 500 error. Very misleading Microsoft!

提交回复
热议问题