C #: get CNAME and MX record from domain?

Can someone tell me how to programmatically extract cname and mx records from an internet domain (www.example.com) using C #? According to my short research, I understand that this is possible using sounding a UDP socket on a DNS server, BUT, is it possible to achieve this without knowing the address of the DNS server, only a domain name, for example "www.example.com"? I think this is possible because I used some kind of third-party free toolkit to successfully record MX records without knowing the address of the DNS server.

thanks a lot

+3
source share
2 answers

, , . , , - asp.net, - -.

  • - DNS ( DNSWatch), URL-.
  • HTML

HTML-, Yahoo YQL-html- XML JSON.

  • YQL
  • SQL Statement : * html, url = " URL DNS" xpath = 'XPATH QUERY S MX HTML'
  • YQL
  • , YQL HTTP-. YQL JavaScript-.

: : - HTML DNSWatch .

1 .

+1

.Net framework , Platform SDK MSDN DnsQuery. , , DllImport

0

All Articles