I'm working on a ASP.NET MVC 4 website. Together with MVC controllers, I have one API controller which contains an ajax GET API interface. It works perfectly when debugged locally with visual studio.
However, after I deployed it as an Azure Website, MVC controllers work, but the API controller doesn't work anymore. When jQuery code tries to reach it, it returns a response like:
No HTTP resource was found that matches the request URI 'http://example.com'.
It looks like at least the route works (otherwise, another 404 response body is returned.).
Additionally, I have another pure MVC 4 Web API service deployed as an Azure Cloud Service. It works perfectly. Thus, I wonder what causes the API inside MVC Website to fail? Thank you!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…