I know that I can use Url.Link() to get URL of a specific route, but how can I get Web API base URL in Web API controller?
Url.Link()
In the action method of the request to the url "http://localhost:85458/api/ctrl/"
var baseUrl = Request.RequestUri.GetLeftPart(UriPartial.Authority) ;
this will get you http://localhost:85458
1.4m articles
1.4m replys
5 comments
57.0k users