Some Notes on ASP Component / ActiveX DLL and OCX Registration

An ActiveX component or ASP component is a DLL or OCX file containing one or more classes which can be called from a programming language that supports ActiveX. Before the programme can call the component, it must be "registered" on the computer or server that is running the programme.

There is a command line utility called REGSVR32.EXE that is provided by Microsoft for registering components. It can be found in the Windows System directory and it can be run from the command prompt or from the Run option in the Start Menu. (Note that from Windows Vista and Windows 2008 Server onwards the Command Prompt must be run as an administrator otherwise running REGSVR32 will not successfully register the component.)

The syntax is:

regsvr32 c:\ThePath\DllName.dll

The path to the DLL is required and this can be difficult to type at the command prompt, so we provide a free utility that can be used to register DLL and OCX files using a Windows interface for selecting the file.

There are two executable files supplied in the download. The 32 bit version, DllRegSvr.exe, and the 64 bit version, DllRegSvr64.exe. It is not possible to register a 32 bit component with the 64 bit version and vice versa.

Download the free utility - (1.9 MB)

Using DLLRegSvr

To use this utility, unzip the file and run the appropriate executable. It will attempt to run as the administrator so Windows will ask if you want to allow the programme to make changes to your computer.

Click the "Browse" and navigate to, and select, the DLL or OCX file that you wish to register. Then click the Register button. Files can also be unregistered by using the other button.

It is also possible to use file association or right click the DLL file in Explorer and use "Open With" to set DllRegSvr.exe as the application which handles these files. This will open the application and select the DLL file without having to browse to it.

ASP component registration utility

The features of raising itself to the administrator and the file association are new in version 3.0.

In the case of ASP components which are used by IIS, you must make sure that the Internet Guest User has read and execute permission on the DLL file, or the directory containing the DLLs, otherwise an ASP 0178 error will result. On Windows 2008 Server the Internet Guest User account is IUSR and on earlier systems it is IUSR_Machine_Name.

It is not usually necessary to reboot the computer after registration, but occasionally this is required. If you register an ASP component and receive an ASP 0177 error, check that you have typed the class name correctly in the script and if it is correct and you still get the error, try rebooting the machine.

Component File Locations on Windows

In 32 bit Windows many applications installed their component files into the Windows\System32 folder. After the introduction of 64 bit Windows, this folder was reserved for 64 bit files only and 32 bit component files were to be put in the Windows\SysWOW64 folder. This is not what would be expected from the names but it is a result of the way in which the 32 bit emulator maps system files. Do not put 32 bit files in System32 or 64 bit files in SysWOW64. We recommend creating a separate folder for component files because this makes it easier to keep track of what has been installed.

If a 32 bit ASP component is to be used on a 64 bit system it is necessary to either run the web site in 32 bit mode or add the component to a COM+ Application in Component Services. Chestysoft components are now available as both 32 bit and 64 bit.

Using ASP components in ASP.NET

A COM component can be called in ASP.NET once it is registered. For best results, create an Interop Assembly using the TLBIMP.EXE tool. Please note that in .NET it is still the component file that must be registered, not the Interop Assembly file.


This site uses cookies for functionality, traffic analysis and for targeted advertising. Click the Accept button to accept our Cookie Policy. The Cookie Policy page offers configuration for a reduced set of cookies for this site.