You are currently offline, waiting for your internet to reconnect

Active Server Pages returns VBScript runtime error '800a01ad'

This article was previously published under Q194801
The use of CreateObject to create a COM component in an Active Server Pages (ASP) page may result in the following error:
Microsoft VBScript runtime error '800a01ad'
ActiveX component can't create object
This error is usually generated because dynamic-link libraries (DLLs) on which the COM object depends are one of the following:
  • Missing from the system
  • Not in the system path
  • Not accessible by the system because of security settings
Each of the above reasons applies to the DLL that implements the COM objectas well as any of the DLLs dependencies. For instance, if a COM DLLstatically links to a Win32 DLL and the Win32 DLL is missing from thesystem, a 800a01ad error is generated.

There are many ways to determine DLL dependencies. Among these are theDepends.exe tool, which shipped with the Platform Software Development Kit (SDK) and Developer Studio 98, and the DUMPBIN utility, which is installed with Visual C++.

The following files are available for download from the MicrosoftDownload Center:

DownloadDownload the Dependsia64version2.1.3623.exe package now.DownloadDownload the Dependsx86version2.1.3623.exe package now.

Release Date: June 25,2002

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:
119591 How to Obtain Microsoft Support Files from Online Services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file. For more information about this tool, visit the following Dependency Walker Web site: Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.

To use Depends, simply run the tool and open the DLL in question. To use DUMPBIN to view the dependencies, run the following at a command prompt "dumpbin /IMPORTS <name of DLL>". The Depends utility has the advantage of displaying dependencies of dependencies. It would appear that quick view in the Windows Explorer would display the same information, but it has been observed that the information displayed is not always complete.

Further information about each of the possible causes follows:

DLLs Missing From the System

The DLL that implements the COM object must exist on the system and beregistered with the correct path. Creation failure of a COM object that isnot registered at all will actually generate a different error:
Server object error 'ASP 0177 : 800401f3'

To verify that the path in the registry is correct, run the RegEdit programand search for the PROGID (found in the CreateObject call). From the PROGIDentry, record or copy the CLSID to the Clipboard and locate the entry forthe CLSID. This entry should contain an InprocServer32 key with a path tothe DLL. The following illustrates the flow of this process:
   (from the asp file)   set obj = Server.CreateObject("BadComponent.Badguy")   (from RegEdit)   HKEY_CLASSES_ROOT\BadComponent.BadGuy\CLSID      {683DA7E0-5C73-11D2-80F6-0000F87A8236}   HKEY_CLASSES_ROOT\CLSID\{683DA7E0-5C73-11D2-80F6-0000F87A8236}\       InprocServer32 E:\Programs\COMPON~1\BADCOM~1\Debug\BADCOM~1.DLL				

The following commands run from a command prompt will verify the existenceof this file:
   E:\>cd E:\Programs\COMPON~1\BADCOM~1\Debug   E:\Programs\COMPON~1\BADCOM~1\Debug>dir BADCOM~1.DLL   10/14/98  11:18a               241,739 BadComponent.dll                  1 File(s)        241,739 bytes                             2,038,755,328 bytes free				

If no path is specified in the registry for the DLL, the DLL must exist inthe system path.

A COM DLL may have dependencies other than Win32 DLLs that are staticallylinked (DUMPBIN and Depends.exe show DLLs statically linked). For instance,a COM object may call LoadLibrary() and call functions in a Win32 DLL.Similarly, the control may create COM objects that are contained inseparate DLLs. Any of these DLLs may be missing, improperly registered, oninaccessible due to security. This would result in a runtime error that mayor may not be encountered during the creation of the control. ReturningS_FALSE from the FinalConstruct() method of an ATL control can simulate anexample of control failing in such a manner during creation. This assumesLoadLibrary() or CoCreateInstance() failed in FinalConstruct(), and theprogrammer chose to check for this and return S_FALSE. The error generatedin this case will be similar to the following:
error 'ASP 0115'
Unexpected error
A trappable error occurred in an external object. The script cannot
continue running.
Server object error 'ASP 0115 : 8000ffff'

Failure of this type will not generate an 800a01ad error.

DLLs Not in the System Path

The system must be able to find the dependant DLLs (statically linked) ofthe DLL that implements the COM object being created. Using DUMPBIN orDepends, determine what the dependent DLLs are. Verify that all of theseDLLs are either in the same directory as the COM DLL or in the system path.

DLLs Not Accessible by the System Because of Security Setting

When a client requests an Active Server Pages (ASP) page from a server, theASP page runs in a security context dependant on the authentication methodused to access the Web Server. For instance, anonymous requests run in thecontext of the IUSR_MACHINENAME where MACHINENAME is the name of yourcomputer. For information on other authentication methods and securityconsiderations, please consult the IIS documentation. What this means interms of an 800a01ad error is that the authenticated user must have access(via NTFS file permissions) to the COM DLL and all of the dependant DLLs.

A shotgun approach can be used to determine if this is the cause of theproblem. Using the Windows Explorer, select Properties for the COM DLL,select the Security tab, and grant "everyone" at least read access to theDLL. Do the same for the dependent DLLs and directories containing theDLLs. This should eliminate any security restrictions that may be affectingthe creation of the COM object. Security can be tightened after it isdetermined that this was the problem. Keep in mind, many of the dependantDLLs are Windows system DLLs and will have at least "everyone read" accessalready. Do not mistakenly remove this access when "tightening" thesecurity.

(c) Microsoft Corporation 1998, All Rights Reserved. Contributions byRobert E. Duke, Microsoft Corporation.


Article ID: 194801 - Last Review: 07/08/2005 23:39:32 - Revision: 6.4

  • Microsoft Internet Information Server 4.0
  • Microsoft Internet Information Services 5.0
  • kberrmsg kbprb kbsecurity KB194801