Answer the question
In order to leave comments, you need to log in
How to add a WEB API controller to an existing ASP NET MVC?
There was a problem, everything worked, but after dividing the project into layers, going to api / st (st-name of the controller) shows that such a page was not found, but it should give the result of the getALL () method in XML format
Answer the question
In order to leave comments, you need to log in
There are (well, there should be) 2 files in the App_start folder - RouteConfig and WebApiConfig. Make sure all routes are properly defined and that your api/st is looking for the st controller, not the api controller c action-st. Nobody canceled the rule from particular to general.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question