tags:

views:

298

answers:

3

From a .NET application, I need to query a specific DNS server for resolving a domain name (the DNS server is not defined in the Windows network configuration).

I know this is not possible using standard .NET Framework classes (See this other question). My question is what my options are. There is one open source library on CodePlex (DnDns) which does that, but it hasn't been updated in a long time, and my application is mission-critical so reliability is extremely important.

Any suggestions?

+1  A: 

I think the best option is to study the DNS protocol (which is quite easy) and implement it yourself using .net udp sockets.

DNS is really an easy protocol to understand and to implement.

Moreover, you can use the sourcode from DnDNS to see the catches in the program/protocol

Henri
A: 

You could also take a look at opendns.net and check if it fits your application

armannvg
A: 

You can do this with "JH Software's DNS Client for .NET". See the second code sample at http://www.simpledns.com/dns-client-lib.aspx

Jesper