I need to get the IP address of the client's computer not the server IP. using C#
I made research already and nothing provided the right answer. I tried
string strHostName = System.Net.Dns.GetHostName();
string clientIPAddress = System.Net.Dns.GetHostAddresses(strHostName).GetValue(0).ToString();
HttpContext.Current.Request.UserHostAddress;
HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
none of these worked for me.
I also tried javascript, putting the IP Address in the control and is workingfine. However, the control valu is not being captured when executed on Page Load event.