server ip address

  • Thread starter Thread starter Starbuck
  • Start date Start date
S

Starbuck

Hi
Given that I know the servers name (eg server) is there a way of obtaining
its ip adress in vb.net

Thanks in advance
 
Starbuck said:
Given that I know the servers name (eg server) is there a way of
obtaining its ip adress in vb.net

\\\
Dim host As System.Net.IPHostEntry =
System.Net.Dns.GetHostEntry("SERVER_NAME")
Dim ip As System.Net.IPAddress = host.AddressList(0)
MsgBox(ip.ToString)
///
 
Thanks


Oenone said:
\\\
Dim host As System.Net.IPHostEntry =
System.Net.Dns.GetHostEntry("SERVER_NAME")
Dim ip As System.Net.IPAddress = host.AddressList(0)
MsgBox(ip.ToString)
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top