Retrieving the COM class factory ... failed

Topics: User Forum
Nov 15, 2009 at 4:06 AM
Edited Nov 15, 2009 at 4:08 AM

I installed AVFP 4 in Windows 7 (and enabled IIS 6 compatibility). Ran webappbuilder succesfully to create a sample application named "appname". But when I open the \\localhost\appname I get the following error:


Server Error in '/appname' Application.

Retrieving the COM class factory for component with CLSID {BEF60CED-FB7C-4835-A927-4EC90F5162CB} failed due to the following error: 80040154.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {BEF60CED-FB7C-4835-A927-4EC90F5162CB} failed due to the following error: 80040154.

Source Error:

Line 3:  <%
Line 4:  server x ;
Line 5:  x = new server() ;
Line 6:  try
Line 7:     {
Nov 15, 2009 at 11:15 AM

Did the setup start the demo application successfully when you installed AVFP?  If it did then that means your new application should work too.  Does this error always occur when you try to run your application? the demo application that came with setup too?? 

If it is a Windows 7 specific problem, I won't be able to help until my copy arrives in the mail and I install and play with it. 


Nov 16, 2009 at 3:05 PM

I've been able to reinstall the demo succesfully. But, I get the same error as with my own application.

Retrieving the COM class factory for component with CLSID {BEF60CED-FB7C-4835-A927-4EC90F5162CB} failed due to the following error: 80040154.

I also installed it on a different PC running XP Professional and it works. It seems to be a Windows 7 problem.

Nov 16, 2009 at 4:34 PM

Try manually registering activevfp.dll - it sounds like that error means it wasn't registered correctly:

(btw, Is it 64bit windows 7??)

I googled some possibly same problems - check the following out:

If you do further googling, try searching on these terms:

windows 7 "Retrieving the COM class factory for component" "failed due to the following error: 80040154"

Nov 16, 2009 at 9:26 PM

Yes it is 64bit windows 7

Nov 16, 2009 at 10:30 PM

I got the copy of Windows 7 for 64 bit today but I don't know when I'll have a chance to test/fix.

In the mean time, I think this link has some pertinent info:

Nov 18, 2009 at 12:50 AM

I found this link . I followed the instructions to enable .NET 32 bit on a 64bit machine. Now I have a different error:

Caught .NET exception, source: servervariables err#= 1943 line= 1444 Member SERVERVARIABLES does not evaluate to an object.1943 Member SERVERVARIABLES does not evaluate to an object. SERVERVARIABLES .NULL. .NULL. .NULL. .NULL. c:\program files (x86)\dotcomsolution\avfpdemo41\activevfp.dll message: c:\program files (x86)\dotcomsolution\avfpdemo41\activevfp.dll


I'm not in a rush. Just trying to explore ActiveVFP, whenever I have some free time. 

Nov 18, 2009 at 2:47 PM
Edited Nov 18, 2009 at 2:50 PM

Well it looks like you have to do the following:

1.) Turn on IIS 6 configuration compatibility from Windows Features dialog (I'm assuming you already did this)

2.) Enable 32 Bit operation.  From a Command Prompt:

cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 true

3.) **NOT SURE IF THIS IS REQUIRED YET** Reconfigure ASP.NET for the 32 bit version:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_iisreg -i


Oct 10, 2014 at 3:50 PM
I also getting this error after using Windows 7 32 bit.
However the solution is solved, once we perform "regsvr32 active.avfp" under Command Prompt which is to be run as administrator.

Good luck.
Oct 23, 2014 at 4:27 PM
Sorry, if for Win7 32 bit error, probably 0x80004005,

Kindly use command prompt as in Administrator mode, then type regsvr32 "c:\activevfp.dll"

must use " " to show the location of the activevfp.dll

Good Luck.