System.Net.Http.HttpRequestMessage
Request
private string GetUserHost(System.Net.Http.HttpRequestMessage request) { const string key = "MS_HttpContext"; if (!request.Properties.ContainsKey(key)) return string.Empty; var context = request.Properties[key] as System.Web.HttpContextWrapper; return context?.Request.UserHostAddress ?? string.Empty; }
ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.