.NET Error: Class not registered Exception from HRESULT: 0×80040154

Posted by VIJI Wednesday, February 17, 2010

This error might occur when an ActiveX control is not registered in the machine. For example, the DSO Framer control (an ActiveX control to host office file) works fine in the local machine. After deployment in another machine, it might throw the error: “Class not registered

Reason:
An AciveX control needs to be registered before it can be used

How to register the active-x control?

1) Using regsvr32.exe (Manual registration)


The active-x control needs to be manually registred in that machine by using regsvr32.exe.
Go the the DOS prompt and type in "regsvr32.exe c:\DSOFramer.ocx".


2) During Deployment: (Best option)


1. Add the dsoframer.ocx in your Setup project
2. Set the Register property of this file to vsdrfCOM.
3. Build the Setup project and run the resulting MSI package to install your application as well as the DSOFramer ActiveX control on the target machine.

    0 Responses to .NET Error: Class not registered Exception from HRESULT: 0×80040154

    Post a Comment