How to resolve DNS?

akhhttar

Active member
Joined
Aug 6, 2005
Messages
28
Location
Bahawalpur-Pakistan
Programming Experience
1-3
Hi,
I wanna resolve DNS using custom DNS Server.
When i try to resolve any DNS using 'Dns.Resolve()' function, it use Default DNS provided by Network Connection.
can anybody guide me that how can i resolve DSN to IP address by custom DNS Server.
 
VB.NET:
 Imports System.net 
 
{...}
 
Try
 
Dim ipHE As IPHostEntry
 
Dim ipAD As IPAddress
 
ipHE = Dns.Resolve("www.vbdotnetforums.com")
 
For Each ipAD In ipHE.AddressList
 
MessageBox.Show("AddressFamily: " + ipAD.AddressFamily.ToString() + _
 
ControlChars.NewLine + _
 
"Address: " + ipAD.ToString())
 
Next
 
Catch ex As Exception
 
MessageBox.Show("Error msg: " + ex.Message)
 
End Try



result:

AddressFamily: InterNetwork
Address: 64.92.192.8


Regards ;)
 
i want to user custom DNS server

Dns.Resolve() function use windows default DNS server , but i want to use other DNS server.
Actually i m developing a simple DNS monitoring application......in which user specify a particulat DNS server address and the website address .....and then my application resolve that website address using the particular DNS server that provider by user.
Hopefully now u understand what actually i want to ask....
Thanx for ur reply kulrom...
 
Back
Top