Reverse DNS Lookup - Need Ability to specify which DNS Server is contacted.

S

Screenbert

I have a web page that displays and creates DNS entries. It displays
DNS entries if they exist for certain IP ranges. (Usually about 20 IP
address at a time) If a DNS entry needs to be created then it creates
the entry. However if I use GetHostEntry() to perform the DNS lookup it
does not show me the entry I just created. It takes several minutes
before it would appear.I assume this is happening because GetHostEntry
queries the DNS server listed on the IIS machine.

I need the ability to query a specific DNS server so that I can query
the server that I just created the DNS entry on. The only way I could
find to do this is via a WMI query. However the page takes anywhere
from 30-120 seconds to complete the WMI query and I am looking for
something faster. Each WMI query takes 30 to 120 seconds so I have
managed to write 1 WMI query per run and dump all of it into a table
and display it instead of doing 20 or so WMI queries each time. It is
still slow.

I found this page where he has written an assembly that queries the DNS
server directly, but he does not have support for Reverse DNS lookups.
http://www.codeproject.com/cs/inter...&exp=0&select=1508409&tid=1377747#xx1508409xx

Does anyone know a way to do Reverse DNS Lookups without using WMI and
still have the ability to specify a DNS server?

Thanks,
Screenbert
 
P

Peter Duniho

Screenbert said:
[...]
Does anyone know a way to do Reverse DNS Lookups without using WMI and
still have the ability to specify a DNS server?

I don't know a .NET solution to your specific question (though there may
well be one). But what about simply caching a list of the DNS entries you
created and check that before trying GetHostEntry()? You could even cache
DNS queries that you already made to GetHostEntry() to speed those queries
if they repeat later as well.

Pete
 

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