dotnet.core 获取访客的公网IP与局域网IP 现在奉上代码
public void OnGet() {var ip = Content(HttpContext.Connection.RemoteIpAddress.ToString()).Content;var localip = Content(HttpContext.Connection.LocalIpAddress.ToString()).Content; }