System.Net.Dns - Is an Authoritative answer possible?

  • Thread starter Thread starter brett.mack
  • Start date Start date
B

brett.mack

Is it possible to get an authoritative answer from System.Net.Dns, much
as you can get from nslookup? I Know it's not giving me one because I
put an entry into my hosts file (a fake ip of a real entry) and it
gives me a response showing what's in the hosts file.

If not, is there another alternative within the .Net framework to get
authoritative DNS info?

Thanks in advance!
 
That IS an authoritative response. DNS info is stored in files on various
servers (including the local machine). The machine first looks in its own
cache, and then queries its' DNS server, in that order. It may go on from
there, depending. The point of the whole business is to take the least
amount of time and bandwidth possible to get the answer.

--
HTH,

Kevin Spencer
Microsoft MVP
Bit Player
http://unclechutney.blogspot.com

In case of Minimalism, break Philip Glass.
 
Hmmm, okay, let me rephrase that:

I need a response from the server, bypassing the local dns cache &
hosts file, much like nslookup does.
 
Hello,

the .NET Api doesn't offer this. You'll have to interop into Win32 and call
the DnsQuery function.

It allows you to specify the options you require.

Best regards,
Henning
 
Back
Top