happymozart
asked on
DnsQuery failed with errorcode 9002
Hello
I tried the sample application dnsquery.cpp from the SDK with following parameter "dnsquery -n landmine.de -t A -s 194.25.2.129" -> ErrorCode 9002
With my application I have the same problem. If the parameter PIP4_ARRAY is NULL it works fine.
Thank you
(WinXP Prof, VisualC++)
I tried the sample application dnsquery.cpp from the SDK with following parameter "dnsquery -n landmine.de -t A -s 194.25.2.129" -> ErrorCode 9002
With my application I have the same problem. If the parameter PIP4_ARRAY is NULL it works fine.
Thank you
(WinXP Prof, VisualC++)
Does the sample code from http://support.microsoft.com/default.aspx?scid=kb;en-us;831226 ("How to use the DnsQuery function to resolve host names and host addresses with Visual C++ .NET") work?
Um, sorry, that seems to be the same code. BTW, the error is DNS_ERROR_RCODE_SERVER_FAI LURE, which would correspond to that server only returning 'nonauthoritative' results:
> set querytype=A
> landmine.de 194.25.2.129
Server: 194.25.2.129
Address: 194.25.2.129#53
Non-authoritative answer:
Name: landmine.de
Address: 212.12.60.226
> set querytype=PTR
> landmine.de 194.25.2.129
Server: 194.25.2.129
Address: 194.25.2.129#53
Non-authoritative answer:
*** Can't find landmine.de: No answer
Authoritative answers can be found from:
landmine.de
origin = ns3.weitblick.net.
mail addr = root.weitblick.net.
serial = 2005051184
refresh = 14400
retry = 1800
expire = 604800
minimum = 86400
Does
dnsquery -n landmine.de -t A -s 212.12.60.226
work?
> set querytype=A
> landmine.de 194.25.2.129
Server: 194.25.2.129
Address: 194.25.2.129#53
Non-authoritative answer:
Name: landmine.de
Address: 212.12.60.226
> set querytype=PTR
> landmine.de 194.25.2.129
Server: 194.25.2.129
Address: 194.25.2.129#53
Non-authoritative answer:
*** Can't find landmine.de: No answer
Authoritative answers can be found from:
landmine.de
origin = ns3.weitblick.net.
mail addr = root.weitblick.net.
serial = 2005051184
refresh = 14400
retry = 1800
expire = 604800
minimum = 86400
Does
dnsquery -n landmine.de -t A -s 212.12.60.226
work?
BTW, just in case I forgot to mention - there's no need to specify a nameserver for 'DnsQuery()', you can safely omit the '-s' parameter.
ASKER
Thanks for the answer
I can't try this at the moment (firewall), but I think it would work.
I have the following problem:
I want check a list of domains, if the are free (should be fast). denic.de refresh there servers all 2 hours and this is the reason why i would use the nameserver-parameter. How can I solve this problem with the API functions? Is this the wrong way?
Thx 'in advance'
I can't try this at the moment (firewall), but I think it would work.
I have the following problem:
I want check a list of domains, if the are free (should be fast). denic.de refresh there servers all 2 hours and this is the reason why i would use the nameserver-parameter. How can I solve this problem with the API functions? Is this the wrong way?
Thx 'in advance'
ASKER
Yes it works
----
C:\DnsQuery>nslookup google.de 192.78.153.60
Server: ns1.keba.co.at
Address: 192.78.153.60
Non-authoritative answer:
Name: google.de
Addresses: 216.239.39.104, 216.239.57.104, 216.239.59.104
----
C:\DnsQuery>DnsQuery.exe -n google.de -t A -s 192.78.153.60
The IP address of the host google.de is 216.239.39.104
Why does the programm works here? Nslookup says, that this is a Non-authoritative answer.
Thx
----
C:\DnsQuery>nslookup google.de 192.78.153.60
Server: ns1.keba.co.at
Address: 192.78.153.60
Non-authoritative answer:
Name: google.de
Addresses: 216.239.39.104, 216.239.57.104, 216.239.59.104
----
C:\DnsQuery>DnsQuery.exe -n google.de -t A -s 192.78.153.60
The IP address of the host google.de is 216.239.39.104
Why does the programm works here? Nslookup says, that this is a Non-authoritative answer.
Thx
>>Why does the programm works here?
Good question. That may be due to the configuration of the DNS server - the latter one might be configured to return a result for an 'A' record query, the other to return an error.
Unfortunately, niether http://uptime.netcraft.com/up/graph?site=ns1.keba.co.at nor http://uptime.netcraft.com/up/graph?site=dns03.btx.dtag.de yield any results at the moment to verify the NS type.
Good question. That may be due to the configuration of the DNS server - the latter one might be configured to return a result for an 'A' record query, the other to return an error.
Unfortunately, niether http://uptime.netcraft.com/up/graph?site=ns1.keba.co.at nor http://uptime.netcraft.com/up/graph?site=dns03.btx.dtag.de yield any results at the moment to verify the NS type.
ASKER
This means, there is no possibilty to get ANY information about the domain at these DNS (eg: "194.246.96.1" (denic.de)) with windows-api-functions (modfiy wType, fOptions-parameter)?
Thx
Thx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
OK thank youi