Answers for "asp net core get remote ip"

C#
7

net core get remote ip

var ip = _accessor.ActionContext.HttpContext.Connection.RemoteIpAddress.ToString();
Posted by: Guest on April-08-2020
2

get host ip address asp.net core

var httpConnectionFeature = httpContext.Features.Get<IHttpConnectionFeature>();
var localIpAddress = httpConnectionFeature?.LocalIpAddress;
Posted by: Guest on December-09-2021

Code answers related to "asp net core get remote ip"

C# Answers by Framework

Browse Popular Code Answers by Language