我试过this.ActionContext.HttpContext,但找不到UserHostAddress或ServerVariables属性.
谢谢
httpContext.Features.Get<IHttpConnectionFeature>()?.RemoteIpAddress