Saludos:
Nesesito saber como obtener la direccion Ip del equipo en donde se esta ejecutando mi aplicacion
Gracias
| |||
Re: Saber Ip del equipo Imports System Imports System.Net Module Module1 Sub Main() Dim strMachineName As String 'Get the Host Name strMachineName = Dns.GetHostName() Console.WriteLine("Host Name: " + strMachineName) 'Get the Host by Name Dim ipHost As IPHostEntry ipHost = Dns.GetHostByName(strMachineName) 'You can also query the DNS database for info on a 'website like web.com 'In that case replace the above line as: 'ipHost = Dns.GetHostByName("web.com") 'Get the list of addresses associated with the host in an array Dim ipAddr() As IPAddress = ipHost.AddressList Dim count As Integer 'Enumerate the IP Addresses For count = 0 To ipAddr.GetUpperBound(0) Console.Write("IP Addresses {0}: {1} ", count, _ ipAddr(count).ToString) Next End Sub End Module |