What is aspNetDns?
|
|
aspNetDns is a server component. It requires the Microsoft .NET runtime in order to function properly. aspNetDns is used to programmatically query DNS servers
for information, WITHOUT having to worry about complex packet parsing. aspNetDns easily returns information in a humanly readable form.
|
|
What does aspNetDns do? |
|
In short, aspNetDns queries DNS servers for host information. For example, you can use aspNetDns to find out the information of all the computers
currently using your website, or validate DNS servers have properly propagated information across the internet.
|
|
Who needs aspNetDns? |
|
aspNetDns is useful to anyone who has an online presence and needs to validate or query computer information.
|
|
What do I need to run aspNetDns? |
|
aspNetDns is a low overhead, highly optimized assembly, that only needs the Microsoft .NET (or equivalent)
framework to run. Any system that can support the Microsoft.NET framework will be able to use aspNetDns.
aspNetDns can be used from any environment supported by .NET.
These environments include winforms, ASP.NET, console applications, components, or web services.
|
|
How do I use aspNetDns?
|
|
aspNetDns can only be used programmatically from a .NET environment, including, but not limited to, ASP.NET, win forms, console applications, and web services.
Here are two brief examples for using aspNetDns from C# and Visual Basic. For more examples, click here.
[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
|
|
Can aspNetDns query records asynchronously?
|
|
Yes, aspNetDns can query ALL records asynchronously. aspNetDns returns the result in a call back function. Here are two code snippets for retrieving Address records asynchronously.
[C#]
static void Main(string[] args)
{
string LookupRecord = "microsoft.com";
AddressRecord.GetAddressRecordsAsync( LookupRecord,
new ARecordDelegate( RetrieveAddressRecord) );
}
private static void RetrieveAddressRecord(AddressRecord[] records)
{
if( records.Length > 0 )
{
foreach( AddressRecord r in records )
Console.WriteLine( r.AnswerString );
}
else
Console.WriteLine( "No records were found.");
Console.ReadLine();
}
[Visual Basic]
Sub Main()
Dim LookupRecord As String = "microsoft.com"
AddressRecord.GetAddressRecordsAsync(LookupRecord,
New ARecordDelegate(AddressOf RetrieveAddressRecord))
End Sub
Private Sub RetrieveAddressRecord(ByVal records() As AddressRecord)
If records.Length > 0 Then
Dim r As AddressRecord
For Each r In records
Console.WriteLine(r.AnswerString)
Next r
Else
Console.WriteLine("No records were found.")
End If
Console.ReadLine()
End Sub
|
|
What kinds of records can aspNetDns query?
|
|
aspNetDns is the most robust DNS component available.
It can query records defined in RFC's 1035, 1183, 1886, and 2052.
Here is brief listing of supported DNS Record Classes.
- AAAA (IPv6) Record
- Address Record
- Canonical Name (CName) Records
- Host Information Records
- ISDN Records
- MailBox (MB) Records
- MailBox Rename (MR) Records
- Mail Destination Records
- Mail Exchange (MX) Records
- Mail Forwarder Records
- Mail Group Records
- Mail Information Records
- Name Server (NS) Records
- NULL Records
- Pointer (Reverse Lookup) Records
- Responsible Person (RP) Records
- Route Through (RT) Records
- Start Of Authority (SOA) Records
- Service (SRV) Records
- Text (TXT) Records
- Well Known Services (WKS) Records
- X25 Records
|
|
What is the difference between aspNetDns and System.Net.Dns?
|
|
The System.Net.Dns namespace only returns IPHostEntry values. Basically this means that it can only perform Address record
lookup and Reverse Lookups. However, because windows can employ netbios and wins, sometimes these methods actually return Netbios and Wins
database information, instead of the actual information found in the DNS Servers, resulting in fault results.
aspNetDns can perform over 20 different queries. It can perform all of these synchronously or asynchronously. It also has the capability of using
different DNS servers for Fail over capabilities. aspNetDns also has the capability to specify timeouts and return all records that belong to a DNS class.
For a tabular comparison, view aspNetDns Features
|
|
I don't like aspNetDns, why didn't you make it better?
|
|
Tell us what we are doing wrong. We love to get feedback, both good and bad. If you have some specific points about aspNetDns, please tell us, so we can make a better product. Feel free to contact us at
support@advancedIntellect.com
|