Reading NS records in C# using ARSoft packages

In this post you will learn about reading NS records in C# using ARSoft packages. This package is handy to read domain NS records. Here's a sample code which will help:

using System;
using System.Linq;
using ARSoft.Tools.Net;
using ARSoft.Tools.Net.Dns;
namespace ConsoleApp14
    class Program
        static void Main(string[] args)
            var dnsMessage = DnsClient.Default.Resolve(DomainName.Parse(""), RecordType.Ns);
            var nsrecords = dnsMessage.AnswerRecords.OfType<NsRecord>();
            foreach (var record in nsrecords)

Here's the output of the above code:

Hope this helps.


Popular posts from this blog

Customize User's Profile in ASP.NET Identity System

Migrating database from ASP.NET Identity to ASP.NET Core Identity