I'm trying to get visitors' IP using Hidden visitor profiling form element. I've got it set to collect IP info like this:
but I see no data in form submissions:
I tried to whatch network activity and saw that when I posted the form, Episerver would request freegeoip.net with "http://freegeoip.net/json/?q= "
So there is no IP in this request too.
I also have tried to collect User agents info which again has resulted with no data.
Could anyone give me a hand with this, please? Am I missing some additional configuration?
Have you test with public IP? (like using your mobile phone with 3G and test your site).
Some network might mask the IP, and l think the IClientIPAddressResolver cannot get your IP.
/// Gets client IP address.
/// <returns>IP address string</returns>
private string GetClientIPAddress()
var clientIPAddressResolver = ServiceLocator.Current.GetInstance<IClientIPAddressResolver>();
var clientIPAddress = clientIPAddressResolver.ResolveAddress(new HttpContextWrapper(HttpContext.Current)).ToString();
if (clientIPAddress.Equals("::1", StringComparison.OrdinalIgnoreCase))
Thanx for reply!
It seems that the reason was freegeoip.net service though. It statrted to serve the requests and hidden profiling works as expected now.