I have a solution with 2 projects. One is an ASP.NET Web API project and the other is an ASP.NET MVC project. The web api will be consumed from various clients. If the 2 projects were one I could generate a link for my api like this:
@Url.RouteUrl("ActionApi", new { httpRoute = string.Empty, controller = "User", action = "AddChildAsync" });
But now that these 2 projects are separated I cannot do this because the mvc appliction cannot find the configuration for the web api (although I have a project reference from the mvc app to the web api). So is there any elegant way to access web api configuration and generate links dynamically? Thanks in advance.