Home | Demo | Contact Us | Download | Support | Purchase | Products


Other Products
 
  "I cannot believe it! You're [support is ]great, did it so quick and exactly what I want!"
Dana Jian
 
More
Testimonies
[ Online Examples ]
   Online Demo
   
[ Programming Sampples ]
  

Querying Address Records
A simple query for Address records

Querying MX Records
A simple query for MX Records

Querying Canonical (CName) Name Records
A simple query for CName or alias records.

Performing a Reverse Lookup using Pointer Records
Performing a Reverse lookup on an IP Address

Querying Start of Authority Records
Querying for Start of Authority Records for a given domain.

Using Failover DNS Servers
Use multiple DNS servers for failover functionality.

Using the aspNetDns.Records Namespace
Querying Address Records
A simple query for Address records.

Querying MX Records
A simple query for MX records.

Performing a Reverse Lookup using Pointer Records
Perform a reverse lookup on an IP Address.

Querying Start of Authority Records
Query a domain for Start of Authority records.

Asynchronous Programming Samples
Asynchronously Query Address Records
A simple asynchronous query for Address records.

Asynchronously Query MX Records
A simple asynchronous query for Mail (MX) Exchange records.

Asynchronously Perform a Reverse Lookup
A simple asynchronous reverse lookup of an IP Address using pointer records.

[ Downloadable Samples ]
   Download the C# and VB.NET Source Code Winform Examples
Download ASP.NET Source Code Example

 

Here are some simple examples for using aspNetDns

[ C# ]

using System;
using aspNetDns;
using aspNetDns.Records;

string LookupRecord  = "microsoft.com";
DnsQuery dns = new DnsQuery();
ResourceRecord[] records = dns.GetDnsRecords( DnsQueryType.A, LookupRecord );
if( records.Length > 0 )
{
	foreach( ResourceRecord r in records )
	{
		Console.WriteLine( r.AnswerString );
	}
}
else
{
	Console.WriteLine( "no address records exist for " + LookupRecord );
}

[ Visual Basic ]

Imports aspNetDns
Imports aspNetDns.Records


Dim LookupRecord As String = "microsoft.com"
Dim dns As New DnsQuery()
Dim records As ResourceRecord() = dns.GetDnsRecords(DnsQueryType.A, LookupRecord)
If records.Length > 0 Then
    Dim r As ResourceRecord
    For Each r In records
        Console.WriteLine(r.AnswerString)
    Next r
Else
    Console.WriteLine(("no address records exist for " + LookupRecord))
End If


The box is not shipped. aspNetDns is a downloadable product.