|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Getting external IP AddressHi, im using this code to get a computers IPAddress
Net.Dns.GetHostEntry(Net.Dns.GetHostName()).AddressList(0) but that only gets the Lan IPAddress....how can i get the internet IP address? -- -iwdu15 sorry about the double post....i got an error the first time i tried to post,
but apparently it went through anyway -- -iwdu15 "iwdu15" <jmmgoalsteratyahoodotcom> wrote in message No worries. Can't specifically answer your question, because the problem is, news:FEDC67DF-C4F2-4F92-A4E3-474980AD7A9A@microsoft.com... > sorry about the double post....i got an error the first time i tried to > post, > but apparently it went through anyway it depends how you connect. If you go through any kind of router/nat setup, the external address is effectively unknown to your PC. It sends requests to it's default gateway which then processes them. There are lots of websites out there (such as www.whatsmyip.net) that can pick up the external address, so maybe you need to look at somehow sending a request to one of these and processing it? yea...i saw alot of things on that after doing a google search....i was
wondering, would connecting a socket to the same computer then checking the remote end point work? i just want to avoid using any websites incase they are unavailable for some reason.... -- -iwdu15 "iwdu15" <jmmgoalsteratyahoodotcom> wrote in message Do you mean connecting to "yourself"? I don't think so, as it would be news:2E1A1994-9A92-4015-9ED8-0C3295B2253B@microsoft.com... > yea...i saw alot of things on that after doing a google search....i was > wondering, would connecting a socket to the same computer then checking > the > remote end point work? i just want to avoid using any websites incase they > are unavailable for some reason.... clever enough to realise that it is within the local segment... the gateway (and beyond) is only accessed when the computer doesn't "know" how to get to the destination you give it - so anything on the same subnet will connect "directly" (for want of a better phrase), whereas anything else will go to the gateway... Now, I guess you could try pinging a completely random address and not worry if it's there or not, and see if the reply (from the gateway and whatever it's gateway is) gives any information as to the external address? I'm not sure it will, but perhaps worth a go - effectively you need to work out how to do a traceroute... then it shouldn't matter if the remote site is up or down. I don't have code for doing that however, but a google may turn up something... James.
load form in vb.net
How to raise a shortcut picking off each digit of an integer How to use binary files as resources in VB 2005 Need help updating my dataset with changes made on the Source? Getchanges Merge? Problem bei der Installation eines VB.net Programms Re: What .NET classes are SLOW vs. API? vb.net database programming odbc Code Snippet Manager |
|||||||||||||||||||||||