In c# Web API, I need to access the base address of the Web API URL.
I tried using
string applicationpath = HttpContext.Current.Request.ApplicationPath;
but that did not work.
I used the IWebHostEnvironment
, even it did not have enough information about it.
How do I access the url?