I am trying to get the ip address of users hitting my web service. I have tried the following 2 constructs:
With no success. Sometimes I will get a real ip address. Usually the first time during the day that I try it but then after that all I get is 127.0.0.1
I have tested this from several different system with the same results.
Code:
Context.Request.ServerVariables["remote_addr"];
Context.Request.UserHostAddress.ToString();
With no success. Sometimes I will get a real ip address. Usually the first time during the day that I try it but then after that all I get is 127.0.0.1
I have tested this from several different system with the same results.