IIS Request.UserHostAddress returning IPV6 (::1), even when IPV6 disabled
The 4 Guys from Rolla website has a solution here, which I’ve used in my app. Update: Just in case this link goes dead, here is code based on this link: public string GetIpAddress() { string ipAddressString = HttpContext.Current.Request.UserHostAddress; if (ipAddressString == null) return null; IPAddress ipAddress; IPAddress.TryParse(ipAddressString, out ipAddress); // If we got an … Read more