How to get current domain name in ASP.NET Core

How to get current domain name in ASP.NET Core

 

String domainName = $"{HttpContext.Request.Scheme}://{HttpContext.Request.Host}";

2021-10-03