Holen Sie sich Host -IP -Adresse ASP.NET CORE

var httpConnectionFeature = httpContext.Features.Get<IHttpConnectionFeature>();
var localIpAddress = httpConnectionFeature?.LocalIpAddress;
karl-ashraful