0

Folling all the examples I can find, tried various ways and also read about something that may need Task but kind of stuck. Anything I do I get a DNS cant resolve error or the result is null.

public static void LookupDns()
{
    var res = ArLookup("google.com");
}
    
    
public static Task<List<ARecord>> ArLookup(string domain)
{
    var resolver = new DnsStubResolver();
    return resolver.ResolveAsync<ARecord>(domain, RecordType.A);
}

Anyone help me out on this? What am I doing wrong? I can do the simple Microsoft.Net

IPHostEntry hostInfo = Dns.GetHostEntry("www.contoso.com");

so I know that works.

Zippy
  • 455
  • 1
  • 11
  • 25
  • When using my VPN PIA Internet it would not resolve. Wasted 6 hours tracking that down. – Zippy Apr 01 '21 at 19:43

1 Answers1

0

When using my VPN PIA Internet it would not resolve. Wasted 6 hours tracking that down.

Zippy
  • 455
  • 1
  • 11
  • 25