|
-
Feb 27th, 2006, 07:33 PM
#1
Thread Starter
Lively Member
[RESOLVED] Resolving domain IP. Strange behavior.
Ok, I have a simple code to resolve IP address for a specified domain (please excuse the lack of error handling support, but this is a sample only):
VB Code:
Dim dns1 As Dns
Dim ips As IPHostEntry
ips = dns1.Resolve("something.com")
MsgBox(ips.AddressList(0).ToString)
Now, why is it that Internet explorer can resolve something.com and strange.com but that code returns and error indicating that the domain does not resolve?
Thanks!
Luc L.
-
Feb 27th, 2006, 07:40 PM
#2
Re: Resolving domain IP. Strange behavior.
Try adding "http://" to the name. IE has built in functionality to assume that's what you meant, but VB.Net relies on you a little more. May or may not work?
-
Feb 27th, 2006, 07:40 PM
#3
Thread Starter
Lively Member
Re: Resolving domain IP. Strange behavior.
i did that. it returns a different error as well.
-
Feb 28th, 2006, 05:07 PM
#4
Re: Resolving domain IP. Strange behavior.
I got my IDE back, here's what I think you're after. (I was close )
VB Code:
Dim ips As Net.IPHostEntry
ips = Net.Dns.Resolve("www.something.com")
MessageBox.Show(ips.AddressList(0).ToString)
Sorry for the delay, I still need to buy Visual Studio for home use.
-
Feb 28th, 2006, 07:14 PM
#5
Thread Starter
Lively Member
Re: Resolving domain IP. Strange behavior.
thanks steven. that worked great!
-
Feb 28th, 2006, 07:17 PM
#6
Re: [RESOLVED] Resolving domain IP. Strange behavior.
No problem Lucy
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|