Join us this Friday for AI in Action at the Virtual Happy Hour! This free virtual event is open to all—enroll now on Academy and don’t miss out.

 

Episerver Forms, Hidden visitor profiling - no IP

Vote:
 

Hi everybody!

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? 

Thanx.

#147497
Apr 15, 2016 16:12
Vote:
 

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.

/// <summary>
        /// Gets client IP address.
        /// </summary>
        /// <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))
            {
                return string.Empty;
            }

            return clientIPAddress;
        }
#148289
May 09, 2016 13:28
Vote:
 

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.

#148362
May 11, 2016 12:05
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.