Re: System.Net.Dns????
- From: "Brian" <bsgallatin@xxxxxxxxxxxxxxxx>
- Date: Mon, 13 Oct 2008 21:09:49 -0400
ok, now what about passing an ip address?
MsgBox(GetHostEntry(Me.txtLookupHostIP.Text).HostName)
me.txtLookupHostIP.text = 192.168.1.1 This address is assigned from a dhcp
server on the local network....
and is listed in the dns.. and I get "No such host is known"
"kimiraikkonen" <kimiraikkonen85@xxxxxxxxx> wrote in message
news:093dc17a-4135-4a38-8ef9-2e40503bee1e@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Oct 13, 6:05 am, "Brian" <bsgalla...@xxxxxxxxxxxxxxxx> wrote:
I am just trying to pass an IP address and get the Host name... either
from
the internet or local network.. or pass the host name and get the ip..
Using VB 2005, i can get hostname simply by using:
System.Net.Dns.GetHostName.ToString
And getting IP address by passing hostname can be done using:
'-----------------------------------
Imports System.Net.Dns
Imports System.Net
Dim hostname As String
hostname = GetHostName.ToString
For Each ip As IPAddress In _
GetHostEntry(hostname).AddressList
' Return IP address in messagebox
MsgBox(ip.ToString)
Next
'------------------------------
Hope this helps,
Onur Güzel
.
- Follow-Ups:
- Re: System.Net.Dns????
- From: kimiraikkonen
- Re: System.Net.Dns????
- References:
- System.Net.Dns????
- From: Brian
- Re: System.Net.Dns????
- From: kimiraikkonen
- System.Net.Dns????
- Prev by Date: Why does TextBox's validating not work when using DateTimePicker?
- Next by Date: Re: KB278379 Response and Interpretation
- Previous by thread: Re: System.Net.Dns????
- Next by thread: Re: System.Net.Dns????
- Index(es):
Relevant Pages
|