-
Hy, I'm trying to figure how to resolve an asset whith his shortname in the local domain network. With the .net library from Microsoft, it can resolve without any issue. I need to use dnsclient because I need to make the query on specific DNS server in the network. Thanks ! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
:update: see #118 Hi @gecko2308, You can figure out the domain suffix by scanning your network interfaces |
Beta Was this translation helpful? Give feedback.
:update: see #118
Hi @gecko2308,
This library currently only works with FQNs, a fully qualified domain name. Its a pure DNS library and will not query NetBios or WINS servers and all the other things the build in Windows DNS client does.
The .NET library System.Net.Dns uses the native Windows APIs which uses the Windows own Dns resolver.
You can figure out the domain suffix by scanning your network interfaces
NetworkInterface.GetAllNetworkInterfaces();
and look intoGetIPProperties();
of the right interface. If that's all configured you can append that suffix to the hostname your are trying to query.But that might or might not work either depending on your network setup...