get host ip address asp.net core

44

get host ip address asp.net core -

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

Comments

Submit
0 Comments