ServerObjects Logo

AspDNS 2.x

About AspDNS

AspDNS provides IP lookup and reverse host name lookup for known IP addresses.

Upgrading from AspDNS 2.x

If you are running the old copy of AspDNS be sure to follow these instructions for proceding with the upgrade.

Run "regsvr32 aspdns.dll /u" on the old copy of AspDNS.dll before deleting it.

AspDNS Installation

To use this ASP component move the DLL into a subdirectory (like \winnt\system32 for NT or \windows\system for Win95).

To register the component on the system change to the directory where you installed the DLL and type:

regsvr32 AspDNS.dll

Simple Lookup Example

The following code demonstrates how to use AspDNS from VBScript.

  Set DNSLook = Server.CreateObject("AspDNS.Lookup")
  strRes = DNSLook.DNSLookup ("")
  Response.Write ("<b>The IP Address of is " & strRes & "</b>")

About purchasing AspDNS

  1. Licenses on on a per server CPU basis. Purchasing information is available at
  2. Evaluation copies will expire. See the Expires property for details on determining when your copy will expire.

About Upgrades

  1. Users can upgrade for free for minor version changes. For example, upgrades from version 1.00 to 1.99 are free. The upgrade from 1.99 to 2.0 may carry an additional license fee.
  2. The latest version of the components are always available at If a fee is associated with obtaining the upgrade it will be noted on that page.

Upgrade Instructions

To upgrade the component from a previous version please follow these steps:

  1. Stop all IIS related services such as Gopher, FTP and W3SVC.
  2. Change to the directory where the component is located and type "regsvr32 /u AspDNS.dll"
  3. Move the new copy of AspDNS.dll to the current directory and type "regsvr32 AspDNS.dll"
  4. Restart the necessary services.

Questions about AspDNS

"AspDNS never works. I get Server object error 'ASP 0177:800401f3'." This error means "Invalid class string" -- in other words the call to CreateObject failed because the name object cannot be found by the OLE sub-system. Causes include:
  1. You really didn't run regsvr32 on the server after all.
  2. You ran regsvr32 but it reported an error.
  3. Someone modified security on part of the registry that's preventing the OLE subsystem from reading all or part of the HKEY_CLASSES_ROOT tree.
  4. The name of the object you are trying to create was mispelled or is incorrect.
  1. Determine if it's a permissions problem

    Add the anonymous user (used by IIS) to the Administrators group. The test page then worked, proving it was a permissions problem. Do not forget to remove the anonymous IIS user from the Admin group!

  2. Determine if it is a file permissions problem:

    After removing the Anonymous user from the Admin group, add failure auditing to the file (AspDNS.dll), which will determine if the file was ever accessed (by the lack of the failure event). If it isn't, this makes it clear that the failure is prior to file access but go ahead and check file/directory permissions to make sure the anonymous IIS user can access the file.

  3. Check registry permissions

    Using Regedt32, do find on AspDNS.dll. Check the permissions for the key (and sub keys), and make sure that the anonymous user has read rights. Do a find on the class-id, which contains the location value, and version, and check those permissions as well.

"AspDNS never works. I get Server object error 80040154." This is the most common error reported. The error means that ASP could not create the object. Causes include:
  1. You never ran regsvr32 on the DLL. See installation section of this document.
  2. You registered the DLL with regsvr32 in one subdirectory and moved it to another.
  3. IIS does not have proper security permissions to access the DLL or the directory you installed it to. See the ASP FAQ ( for information on changing security.
  4. Your server may be running low on memory.
  5. Your evaluation copy has expired. If you purchased the product be sure you followed directions to install your product key.

Note: Some users have reported that restarting the server after registering the DLL was required to use the component. This should not be necessary but reportedly works in a few cases

"AspDNS works great but sometimes I get 'Server object error 'ASP 0177:80040154'. What's causing this?" If AspDNS works fine, then it suddenly stops working and ASP begins to report this error, then you've probably got a memory leak under IIS/ASP. What has happened is that AspDNS objects can no longer be created. This could be caused by a) You haven't installed the ASP patches that fix known ASP memory leaks b) You have a filter or extension installed that's leaking memory c) You have another component that's leaking memory.

AspDNS 2.x has been run under BoundsChecker to verify that AspDNS does not leak memory.

"When running regsvr32 I get an error: 'LoadLibrary ("AspDNS.dll") failed. GetLastError returns 0x0000007e."
  1. You are trying to install the AspDNS Intel binary on NT for Alpha. Currently there is no Alpha version of AspDNS. One is under construction but there's no ETA for the product yet.
  2. The DLL isn't in the same directory you are running regsvr32 from.
  3. The account you are logged in under doesn't have enough security privileges to read the DLL.
  4. The copy you have is corrupt.
How do I upgrade to the latest version? Download the latest "eval" version and follow the upgrade directions provided earlier in this document.
Can I redistribute this control with my products? The license agreement does not permit redistribution of AspDNS.
My component is licensed. Should the Expires property return a date? No. Licensed versions return N/A for an expiration date. The registration process (per the instructions you received) should be run on the server.
What are the minimum security requirements for AspDNS and IIS/ASP? Technically, the only requirement AspDNS has is that it must have access to the temporary directory as noted in one of the previous troubleshooting tips. But IIS and ASP have certain requirements that must be met to run properly. Thanks to Carl Howell for providing this information.
ASP script directory Creator Owner: Full Control (All)(All)
System: ""
Admin: ""
IUSR: (None)(RX)
\WinNT\ Creator Owner: Full Control (All)(All)
System: ""
Admin: ""
\WinNT\System32\ System: Full Control (All)(All)
Admin: ""
Inetsrv System: Full Control (All)(All)
Admin: ""
Everyone: (RX)(RX)
Does the 2 CPU license cover two servers or two processors? In accordance with the license agreement, the 2 CPU license would cover either 2 single CPU servers or 1 dual CPU server. With this pricing model, AspDNS is far more inexpensive than any "competing" products.

Technical Support

If you require technical support please see our tech support page at

AspDNS Properties

Property Description
Error The error property is a read-only property used to report lookup errors.


Response.Write "Error: " & DNSLook.Error

Expires Returns the expiration date of the component if the component is an evaluation copy.


Response.Write "Component Expires: " & DNSLook.Expires

RegisteredTo If the component has been purchased the RegisteredTo property will return the licensee's name.


Response.Write "Component Licensee: " & DNSLook.RegisteredTo

TimeOut The maximum time the DNS component will wait for an answer from the DNS server.


DNSLook.TimeOut = 45

Version Gets the internal component version number.


Response.Write "Component Version: " & DNSLook.Version

AspDNS Component Methods

Method Parameters Return Value Description
DNSLookup strHostName String DNSLookup does a normal DNS lookup on strHostName. The return value, if successful, is the IP address for strHostName.

strRes =DNSLook.DNSLookup("")

ReverseDNSLookup strIPAddr String ReverseDNSLookup does a reverse DNS lookup on strIPAddr. The return value, if successful, is the host name for strIPAddr.

strRes =DNSLook.ReverseDNSLookup("")


Copyright 1996, 1997, 1998, 1999, 2000 by ServerObjects Inc. All Rights Reserved.