MichaCo / DnsClient.NET

DnsClient.NET is a simple yet very powerful and high performant open source library for the .NET Framework to do DNS lookups
https://dnsclient.michaco.net
Apache License 2.0
762 stars 136 forks source link

question re: TXT records #225

Closed chuck-abrams closed 2 months ago

chuck-abrams commented 2 months ago

trying to get TXT record from our test DNS ts1989.bacasystems.com via

Try Dim Txtresult = Await LookUp.QueryAsync("ts1989.bacasystems.com", QueryType.TXT) Dim Txtrecord = Txtresult.Answers.TxtRecords().FirstOrDefault() Catch ex As Exception MessageBox.Show("Lookup Failed : " + ex.Message) End Try

which Yields "non-existent server'

if i use the DnsClient.NET website query i get back my record of "04-16-2024"

what am i doing wrong? Thx

MichaCo commented 2 months ago

Are you sure the returned error message is non-existent server? There is no such DNS error, only Non-Existent Domain which means that the DNS server you are using doesn't know ts1989.bacasystems.com and cannot resolve it. There is nothing wrong with your code or so, DNS replies highly depend and vary based on what DNS server you are using and per default the library uses whatever is configured on your local machine.

You can initialize LookupClient with a specify (e.g. public) DNS server instead of using whatever is configured on your local network... maybe that helps.