possible to get the local IP address without DNS?

  • Thread starter Thread starter PJ6
  • Start date Start date
P

PJ6

I've found only one way to get the local computer's IP address (in a thick
client app) -

System.Net.Dns.GetHostAddresses(My.Computer.Name)(0)

This seems ass-backwards to me. The local machine already knows its IP
address, so why do I have to go through DNS to get it? And what if the IP
address has been configured manually and there is no DNS?

Is there another way to get the local IP address?

Paul
 
PJ6 said:
I've found only one way to get the local computer's IP address (in a
thick client app) -

System.Net.Dns.GetHostAddresses(My.Computer.Name)(0)

This seems ass-backwards to me. The local machine already knows its
IP address, so why do I have to go through DNS to get it? And what
if the IP address has been configured manually and there is no DNS?

I agree.
Is there another way to get the local IP address?

I don't know which one is considered "local" but maybe this helps: (the
answer, not the quote)
http://groups.google.com/group/microsoft.public.dotnet.languages.vb/msg/cdaafb1cbae18c4b



Armin
 
Back
Top