D
D
Devil Devil2016-08-08 09:59:03
API
Devil Devil, 2016-08-08 09:59:03

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

1 answer(s)
D
Dmitry Kovalsky, 2016-08-08
@BarkovA

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 question

Ask a Question

731 491 924 answers to any question