how to obtain the IP Address of DNS Server through the framework

  • Thread starter Thread starter Brina Avante
  • Start date Start date
B

Brina Avante

Does anyone know how to obtain the IP Address of my local machine's DNS
Service's IP Address through the framework?

I am writing a DNS query that can resolve an email address to its
corresponding mail server IP. Instead of hardcoding the DNS Server's IP
Address, is there a way to obtain the IP programmatically through the
framework? If not, is there a way to resolve an email address
(System.Net.Dns can only resolve hostnames)?

Brian
 
If all you want it to resolve IP address for a server, you might as well do
remove data before @ and send the remaining string into Dns.GetHostByName()
and get the list of IP addresses.
 
no, this wouldnt give you the associated MX records for the domain, which
you need if you want to "resolve" an email address
 
Back
Top