I have simple web API project (ASP.NET MVC). I need to deploy my project in the subfolder on the IIS. For example, I have the site http://TestSite
/ and I need to deploy the project to http://TestSite/MyProject/
. When I did it, web API routing stopped to work. Because my ajax call is routed to the main site - http://TestSite/api/something/get
.
I have tried to update map routing in the next way:
routeTemplate: "MyProject/api/{controller}/{id}",
But it doesn't affect as I want. What I am doing wrong and where can I read about some practices of web API control routing in ASP.NET MVC?