WhoisClient.NET 3.0.1

This library is a WHOIS protocol client used to search owner information by IP address or domain name.
This library determines the WHOIS server automatically and queries the referral server recursively.
The response of the whois query contains strongly typed values, and the raw output.

Install-Package WhoisClient.NET -Version 3.0.1
dotnet add package WhoisClient.NET --version 3.0.1
<PackageReference Include="WhoisClient.NET" Version="3.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add WhoisClient.NET --version 3.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

WhoisClient.NET NuGet Package Build status

Project Description

This is .NET Class library implementing a WHOIS client.

How to install

To install this library into your application, use the NuGet repository.

PM> Install-Package WhoisClient.NET

Sample source code (C#)

Async version

using Whois.NET;
...
private async Task QueryByIPAddress()
{
  var result = await WhoisClient.QueryAsync("8.8.8.8");
  
  Console.WriteLine("{0} - {1}", result.AddressRange.Begin, result.AddressRange.End); // "8.8.8.0 - 8.8.8.255"
  Console.WriteLine("{0}", result.OrganizationName); // "Google Inc. LVLT-GOGL-8-8-8 (NET-8-8-8-0-1)"
  Console.WriteLine(string.Join(" > ", result.RespondedServers)); // "whois.iana.org > whois.arin.net" 
}

private async Task QueryByDomain()
{
  var result = await WhoisClient.QueryAsync("google.com");
  
  Console.WriteLine("{0}", result.OrganizationName); // "Google Inc."
  Console.WriteLine(string.Join(" > ", result.RespondedServers)); // "whois.iana.org > whois.verisign-grs.com > whois.markmonitor.com" 
}

Sync version

using Whois.NET;
...
private void QueryByIPAddress()
{
  var result = WhoisClient.Query("8.8.8.8");
  
  Console.WriteLine("{0} - {1}", result.AddressRange.Begin, result.AddressRange.End); // "8.8.8.0 - 8.8.8.255"
  Console.WriteLine("{0}", result.OrganizationName); // "Google Inc. LVLT-GOGL-8-8-8 (NET-8-8-8-0-1)"
  Console.WriteLine(string.Join(" > ", result.RespondedServers)); // "whois.iana.org > whois.arin.net" 
}

private async void QueryByDomain()
{
  var result = WhoisClient.Query("google.com");
  
  Console.WriteLine("{0}", result.OrganizationName); // "Google Inc."
  Console.WriteLine(string.Join(" > ", result.RespondedServers)); // "whois.iana.org > whois.verisign-grs.com > whois.markmonitor.com" 
}

Supported Framework

v.3.x

  • .NET Core 1.1 or later (.NET Standard 1.4)
  • .NET Frameword v.4.5 or later

NOTICE - WhoisClient.NET v.3.x is no longer supported .NET Framework 4.0.

v.2.x

  • .NET Frameword v.4.0 or later

NOTICE - WhoisClient.NET v.2.x isn't supported .NET Core.

Async version for .NET Framework 4.0

WhoisClient.NET ver.2.x support "async" version methods for also .NET Framework 4.0 with powered by Microsoft.Bcl.Async NuGet package.

But if you don't want get dependencies for Microsoft.Bcl.Async and no need "async" version method, you can stay using v.1.x by like the follow install command.

PM> Install-Package WhoisClient.NET -Version 1.1.1

WhoisClient.NET NuGet Package Build status

Project Description

This is .NET Class library implementing a WHOIS client.

How to install

To install this library into your application, use the NuGet repository.

PM> Install-Package WhoisClient.NET

Sample source code (C#)

Async version

using Whois.NET;
...
private async Task QueryByIPAddress()
{
  var result = await WhoisClient.QueryAsync("8.8.8.8");
  
  Console.WriteLine("{0} - {1}", result.AddressRange.Begin, result.AddressRange.End); // "8.8.8.0 - 8.8.8.255"
  Console.WriteLine("{0}", result.OrganizationName); // "Google Inc. LVLT-GOGL-8-8-8 (NET-8-8-8-0-1)"
  Console.WriteLine(string.Join(" > ", result.RespondedServers)); // "whois.iana.org > whois.arin.net" 
}

private async Task QueryByDomain()
{
  var result = await WhoisClient.QueryAsync("google.com");
  
  Console.WriteLine("{0}", result.OrganizationName); // "Google Inc."
  Console.WriteLine(string.Join(" > ", result.RespondedServers)); // "whois.iana.org > whois.verisign-grs.com > whois.markmonitor.com" 
}

Sync version

using Whois.NET;
...
private void QueryByIPAddress()
{
  var result = WhoisClient.Query("8.8.8.8");
  
  Console.WriteLine("{0} - {1}", result.AddressRange.Begin, result.AddressRange.End); // "8.8.8.0 - 8.8.8.255"
  Console.WriteLine("{0}", result.OrganizationName); // "Google Inc. LVLT-GOGL-8-8-8 (NET-8-8-8-0-1)"
  Console.WriteLine(string.Join(" > ", result.RespondedServers)); // "whois.iana.org > whois.arin.net" 
}

private async void QueryByDomain()
{
  var result = WhoisClient.Query("google.com");
  
  Console.WriteLine("{0}", result.OrganizationName); // "Google Inc."
  Console.WriteLine(string.Join(" > ", result.RespondedServers)); // "whois.iana.org > whois.verisign-grs.com > whois.markmonitor.com" 
}

Supported Framework

v.3.x

  • .NET Core 1.1 or later (.NET Standard 1.4)
  • .NET Frameword v.4.5 or later

NOTICE - WhoisClient.NET v.3.x is no longer supported .NET Framework 4.0.

v.2.x

  • .NET Frameword v.4.0 or later

NOTICE - WhoisClient.NET v.2.x isn't supported .NET Core.

Async version for .NET Framework 4.0

WhoisClient.NET ver.2.x support "async" version methods for also .NET Framework 4.0 with powered by Microsoft.Bcl.Async NuGet package.

But if you don't want get dependencies for Microsoft.Bcl.Async and no need "async" version method, you can stay using v.1.x by like the follow install command.

PM> Install-Package WhoisClient.NET -Version 1.1.1

Release Notes

ver.3.0.1
- Bump IPAddressRange to 3.2.0
- Fix: poor algorithm of detection referral server.
ver.3.0.0
- Enhance: .NET Core support.
- [BREAKING CHANGE] .NET 4.0 was no longer supported.
ver.2.0.1
- Fix: missing XML document comment.
ver.2.0.0
- Add Async API
- Support for .NET 4.5
ver.1.1.1
Backport from bugfix 04939d461c628c574976ef4a686bcde9c298e2c0 of WhoisClient.NET-VS2015 by Keith J. Jones.
- Squashed a minor bug with responded servers output.
ver.1.1.0
Backport from the improvements of WhoisClient.NET-VS2015 by Keith J. Jones.
- Created a maximum timeout for the network connections, reads, and writes.
- Added a maximum number of retries.
- Added this functionality to help with bad network connections.
- Added IntelliSense information.
- Fixed problem with default constructor for WhoisResponse.
- Relaxed member protections.
- Added default constructor for WhoisResponse.
- Moved all queries to start with IANA.  Improved lookup algorithm.
- Fixed an issue detecting an organization name.
- Fixed an issue with an ARIN IP address whois.
- Many bug fixes and enhancements.
ver.1.0.2
- Fix bug with port number referral server response.
ver.1.0.1
- Single out one record when querying domain.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
3.0.1 4,089 7/20/2018
3.0.0 6,904 7/4/2017
3.0.0-beta 245 5/21/2017
2.0.1 3,223 10/21/2016
2.0.0 302 10/20/2016
1.1.1 341 10/20/2016
1.1.0 991 2/4/2016
1.0.2 4,053 3/27/2014
1.0.1 1,241 10/9/2012
1.0.0 621 5/23/2012