For example, we type in IBM.Com and it
returns the listed a,mx,ptr,include records
and TXT records if any. we then process
this information.
ok, but ... do you mean you're performing three (or more)
separate queries (one for A, another for MX and so on..)
or are you running ONE query which sometimes returns
a wealth of intos and some others returns ... "nothing" ??
I've seen that happen at times, the solution was using
separate queries, the cause .. well, afaict ... if the data
you request isn't cached then you'll have the full data
set, otherwise ... ;-)
We are releasing all the memory allocated to the
DNSAPI via system free resources.
What I mean is .. are you calling DnsRecordListFree()
after parsing the returned DNS record list as needed ?
1) What does the DNS local server do? If it has cached the
Records and is serving us the records from its store, when
and how can it be serving us wrong Record?
The DNSAPI can either use the system configured DNS
addresses (TCP properties) or you can specify one or
more DNS servers to be queried, notice that in the first
case the answers will be cached by the DNSclient service
while in the second case this caching won't take place
2) How to byPass the local DNS server in code?
You don't need to do that as long as the local DNS server
is also configured into TCP properties, otherwise, as I wrote
above you can specify the DNS server(s) addresses using
the DnsQuery() "aipServers" parameter - for more details
please refer to the following pages
MSDN reference
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dns/dns/dns_functions.asp
Sample Code (may be of help)
http://www.codeguru.com/Cpp/I-N/internet/dns/article.php/c6173/
3) How to clear the cache on the server, it will have to be done
programmatically as it is a web interface and is open to all
users to query their domain.
I can's see why you want to clean the cache, such a thing will
have a negative impact on the DNS performance, so.. better
writing your code to avoid problems with cached records
You're welcome and ... if Ace will succeed in calling William
"here" he may as well have more tips/infos for you
--
* ObiWan
Microsoft MVP: Windows Server - Networking
http://mvp.support.microsoft.com
http://italy.mvps.org