How can I get the current domain url in Asp.Net MVC Core 6?
Why? This need indicates an issue with the general design.
[HttpGet]
public IActionResult Index()
{
string host = HttpContext.Request.Host.Value;
return Ok(host);
}
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
How can I get the current domain url in Asp.Net MVC Core 6?
I need to get it in my views and controllers
How can I get the current domain url in Asp.Net MVC Core 6?
Why? This need indicates an issue with the general design.
[HttpGet]
public IActionResult Index()
{
string host = HttpContext.Request.Host.Value;
return Ok(host);
}