Retrieve client IP

0
0

Hello,

I made a qr-code scanner, and as extra check I would like to retrieve the public ip of the client.

i tried with this (vb.net) code, but it’s showing me the ip of the server instead of the client :

Application.Session.ClientIP = System.Net.Dns.GetHostAddresses(System.Net.Dns.GetHostName()).GetValue(0).ToString()

 

can somebody help me with this issue?

thanks in advance.

  • You must to post comments
0
0

Ok I will try and keep you informed.

thanks for your quick reply

  • You must to post comments
1
1

Hi BJORN,
Juste use
string ip= Application.ServerVariables.Get("LOCAL_ADDR"); or string ip = Application.UserHostAddress;
Happy coding

Kevin(ITG)

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.