dotnet.core 获取访客的公网IP与局域网IP 现在奉上代码
public void OnGet()
{
var ip = Content(HttpContext.Connection.RemoteIpAddress.ToString()).Content;
var localip = Content(HttpContext.Connection.LocalIpAddress.ToString()).Content;
}
.NetCore.RazorPages 获取访客的公网IP与局域网IP
原文:https://www.cnblogs.com/snow-zhang/p/12294412.html