Find Internet Server IP address
-
I could not find the ip address of my internet server. i used the code to find the server ip but it only fetch my local LAN ip address. i want to know the IP that given by my ISP through C# Windows Application code. or And i use web browser control, how to find the IP address of the URL. Because by using PHP i get the IP using RemoteObject with the browser URL. how i got that same by using that control in C# Windows Application. by Vasanth.A
-
I could not find the ip address of my internet server. i used the code to find the server ip but it only fetch my local LAN ip address. i want to know the IP that given by my ISP through C# Windows Application code. or And i use web browser control, how to find the IP address of the URL. Because by using PHP i get the IP using RemoteObject with the browser URL. how i got that same by using that control in C# Windows Application. by Vasanth.A
Hi, The solution requires the help from a web server. This[^] should help you out. :)
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
-
I could not find the ip address of my internet server. i used the code to find the server ip but it only fetch my local LAN ip address. i want to know the IP that given by my ISP through C# Windows Application code. or And i use web browser control, how to find the IP address of the URL. Because by using PHP i get the IP using RemoteObject with the browser URL. how i got that same by using that control in C# Windows Application. by Vasanth.A
In order to get the out-side-world IP address, you have to talk to the outside world as it is shared between the various users on the LAN. Google for "whats my IP" and you will get lots of hits about it.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced. This message is made of fully recyclable Zeros and Ones
-
I could not find the ip address of my internet server. i used the code to find the server ip but it only fetch my local LAN ip address. i want to know the IP that given by my ISP through C# Windows Application code. or And i use web browser control, how to find the IP address of the URL. Because by using PHP i get the IP using RemoteObject with the browser URL. how i got that same by using that control in C# Windows Application. by Vasanth.A
You can get the ip address(es) from an host name with the following code:
System.Net.Dns.GetHostEntry(hostname).AddressList;
This method will retrieve all the ip addresses corresponding to a given host, documentation here. For example, if hostname is "www.google.com" you will get:{System.Net.IPAddress[6]}
[0]: {74.125.39.105}
[1]: {74.125.39.106}
[2]: {74.125.39.103}
[3]: {74.125.39.104}
[4]: {74.125.39.99}
[5]: {74.125.39.147} -
Hi, The solution requires the help from a web server. This[^] should help you out. :)
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
thank you, but i want to find through C# code give me exameple
-
You can get the ip address(es) from an host name with the following code:
System.Net.Dns.GetHostEntry(hostname).AddressList;
This method will retrieve all the ip addresses corresponding to a given host, documentation here. For example, if hostname is "www.google.com" you will get:{System.Net.IPAddress[6]}
[0]: {74.125.39.105}
[1]: {74.125.39.106}
[2]: {74.125.39.103}
[3]: {74.125.39.104}
[4]: {74.125.39.99}
[5]: {74.125.39.147} -
I could not find the ip address of my internet server. i used the code to find the server ip but it only fetch my local LAN ip address. i want to know the IP that given by my ISP through C# Windows Application code. or And i use web browser control, how to find the IP address of the URL. Because by using PHP i get the IP using RemoteObject with the browser URL. how i got that same by using that control in C# Windows Application. by Vasanth.A
Hi, normally I wouldn't recommend it, but please check my article - it gives you the information you need to get your public IP address with C# (and just C#) without cheats (not using external websites that may disappear at any moment) The second thing, I don't know.
-
Well, if he passes the external dns address of the server, I think he will get the external ip address, or am I wrong?
-
Only if he can get the external dns address in the first place, which might not even exist Btw, I didn't 1-vote you, it didn't seem that bad - just "not exactly what he asked for", his question sortof half implies that it's all a local thing
-
No problem, I was not arguing with you, only clarifying what I had in mind while answering to the OP. I was more concentrated on his second question (getting the IP address from the browser url) that might imply he knows the external address.