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

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
 
G

Girish Bharadwaj

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.
 
J

Joop

no, this wouldnt give you the associated MX records for the domain, which
you need if you want to "resolve" an email address
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top