I am writing a program in C# which uses browser. I need to find out what the computer's IP address is, so I can display it to the user. The program must run on browser.
Asked
Active
Viewed 28 times
-3
-
1by "the computer" do you mean the computer that's hosting the web server or the computer that's using the browser? – D Stanley May 10 '22 at 16:07
-
1If this is running with an embedded browser on the end user's computer, and not a web server, also know that the IP address isn't a simple scalar value, like the amount of RAM. A computer might have multiple interfaces, each with it's own address. A single interface might additionally have multiple addresses. Further, these addresses might then be NAT'd to yet different addresses for public internet connection, and a gateway can even use different NAT values based on what you are connecting to. Finally, yes, all of these situations are less common... but _not as much so as you might think_. – Joel Coehoorn May 10 '22 at 16:11
-
my local computer ip address access to a website, that website able to trace the users ip address is from which country, city. – Jeremy Lim May 10 '22 at 20:15
-
That's called Geolocation, and the thing is it's based on recorded data that is very often stale and inaccurate. Geolocation can and will frequently be wrong. – Joel Coehoorn May 11 '22 at 21:37