ASPDNS COM Component

ASPDNS is an ASP component that provides simple Domain Name Service (DNS) Lookups from your ASP pages. This simply means that the component can be used to resolve internet hostnames such as into their IP Addresses. Alternatively, it can be used to rseolve an IP Address (such as into a fully qualified domain name.

The component is a form of freeware that I call donationware. It can be downloaded from here (1,415,014 bytes). If you have Visual Basic V6.0 SP5 runtimes already loaded on your system, you can download the bare DLL (32,768 bytes) by clicking here. You can then register it yourself using regsvr32.exe. If you are not fully conversant with component registration or are not sure if you have the required runtimes, rather download the full installation.

ASPDNS Component Properties & Methods
Function GetIPFromName(strHostName) As StringGetIPFromName (strHostName)Retrieves the IP Address for a given hostname.
Function GetNameFromIP(strIPAddress) As String  GetNameFromIP (strIPAddress) Retrieves the FQDN for a given IP Address
Sample ASP Code for using the component
   Dim DNS
   Dim A

   Set DNS = Server.CreateObject("ASPDNS.DNSLookup")
   A = DNS.GetIPFromName("")
   Response.Write " = " & A & "<BR>"
   A = DNS.GetNameFromIP("")
   Response.Write " = " & A
   Set DNS = Nothing
Full Installation (Component + Runtimes)1,415,014 bytes
Dynamic Link Library only32,768 bytes
Revision History
March 9, 2002Rebuild with VB6SP5. Changes declaration to work with variants as opposed to string. Also includes error code in return message when Reverse Lookup fails.
April 9, 2000Many people have written and asked about the functions not working well when
using a VBScript Variant. This is because the VBScript Variables are of type Variant
and ASPDNS is looking for a string. A quick fix is to simply typecast your VBScript
variable to string inside the function, i.e say

Response.Write DNS.GetNameFromIP(CStr(Request.ServerVariables("REMOTE_ADDR")))

The same applies to DNS.GetIPFromName. Hope that helps.
April 16, 1999Fixed Long String Return Bug in GetNameFromIP and released V1.0.1
April 15, 1999Initial Release V1.0.0

As every programmer knows, a fair amount of time goes into developing a product. Programmers are normally nice guys but are not the sharpest business people. As a result, we tend to give away things for free. DONATIONWARE is my idea of letting you make a contribution if you feel that you would like to. So, if you like the software and feel that it saved you time, you can make a US$10 contribution. Or you can just use it for free and feel bad about it ;). Either way, the software is the same. It still works and it is not crippled. You will not receive a new super version of the component when you register. The free and the registered versions are the same. You do not HAVE to buy it, but if you want make a contribution, feel free to do so by clicking here or by clicking on the button below. Thanks ;)

Click here to make a donation via

This component is provided as is and without any guarantees or promises. You use it entirely at your own risk. It was written with care but cannot be certified to contain no bugs or errors. You also cannot hold me responsible if it crashes your server or starts World War III. Since it's free, I do not guarantee performance, support or error-free operation.

Contact Information

This Webpage was written in a great hurry, so please don't judge the component on the appearance of this page. One day when I grow up, I'll make a decent page. At least it is better than it predecessor... ;) .If you wish to mail me any comments, feel free to do so at

accesses since 15 April 1999