获取IP地址
var feature = context.Features.Get<IHttpConnectionFeature>(); user.LastLoginIp = feature.RemoteIpAddress.ToString();