O'Reilly logo

Special Edition Using® Microsoft® ASP.NET by Richard Leinecker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the Dns Class

The Internet Domain Name System (DNS) is the general system with which networking applications can retrieve information about specific hosts on a network, usually on the Internet. This information includes host names, domain names, and IP addresses. The Dns class that comes with the .NET framework is a static class. You do not need to instantiate anything before you use it; you can simply call the static methods that are a part of the class.

When the Dns methods return information, it is always in the form of an IPHostEntry object. For example, the following line gets host information based on a domain name:

IPHostEntry HostInfo = Dns.GetHostByName( “www.somedomain.com” ); 

The IPHostEntry object contains all the information ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required