Anyone have an idea of some code I could use in VB.NET so that I could find my net IP address, not my local one? :)
Printable View
Anyone have an idea of some code I could use in VB.NET so that I could find my net IP address, not my local one? :)
Are you behind a router? Because thats seems to be the only problem, when trying to your IP address. If not, it should be easy. Just search the boards, its been asked about before. :)
this may helps
To find your IP address we first ask for your machine name, then we pass that to the GetHostName function that gives us a valid IPHostEntry object. This object contains your IP address in the AddressList array, so we just dump the value to the console.
VB Code:
Dim h As System.Net.IPHostEntry = System.Net.Dns.GetHostByName(System.Net.Dns.GetHostName)_ Console.WriteLine(CType(h.AddressList.GetValue(0),_ IPAddress).ToString)
from abstractvb.com
I have router, what do I do?:confused: