79144207

Date: 2024-10-31 09:52:04
Score: 1
Natty:
Report link

This is based on @mike-rosoft's answer, in case someone still ends up here. The Timeout property is not available anymore from the LookupClient object in later versions of DnsClient. Instead, use this:

        using DnsClient;

        var lookupOptions = new LookupClientOptions(new[] { IPAddress.Parse("8.8.4.4"), IPAddress.Parse("8.8.8.8") })
        {
            Timeout = TimeSpan.FromSeconds(5)
        };
        var lookup = new LookupClient(lookupOptions);
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @mike-rosoft's
  • Low reputation (0.5):
Posted by: Aileron79