I am building a GIS Application but whenever I run the code it's giving me this error
System.Runtime.InteropServices.COMException was unhandled
Retrieving the COM class factory for component with CLSID {FBF5715D-A05D-11D4-A64C-0008C711C8C1} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
Also, in the Project Properties the Option for Register For COM Interop is disabled.
This could also be an issue of building the code using a 64 bit configuration. You can try to select x86 as the build platform which can solve this issue. To do this right-click the solution and select Configuration Manager From there you can change the Platform of the project using the 32-bit .dll to x86
Just looking at the message it sounds like one or more of the components that you reference, or one or more of their dependencies is not registered properly.
If you know which component it is you can use regsvr32.exe to register it, just open a command prompt, go to the directory where the component is and type regsvr32 filename.dll (assuming it's a dll), if it works, try to run the code again otherwise come back here with the error.
If you don't know which component it is, try re-installing/repairing the GIS software (I assume you've installed some GIS software that includes the component you're trying to use).
Related
I need to use a existing old project into new project in .net c#
I've done this:
I compiled the project vb6 in ActiveX DLL, next when I try to add the reference in my project in Visual Studio .net, it don't work (it say that not valid assemble).
I looked for this problem in web and I did found some solution and I tried to import the assembly following directions online and this work fine now
Now the new problem is that when I debug my project I get
Additional information: Retrieving the COM class factory for component with CLSID {0008E6DF-E43B-4DA5-ADFC-2A83E0F04E6C} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
Why? How to solve this?
You need to install VB6 dlls. If you don't you need to manually install it. Com Dlls are usually (and VB6 always) self installable.
regsvr32 c:\path\dllname.dll
For some dll files (not VB6)
regsvr32 /i "command line parameters" c:\path\dllname.dll
I have a weird error when running an asp.net web site.
Everytime i try to run the website, i got this error: "COM class factory for component with CLSID failed due to the following error : 80040154"
I located the dll who is giving me trouble, it's one we developed and never failed before(already used in other sites)
I try every advise on Internet, already try
Check the platform target =X86.
The OS is WS2003, 32 bits, IIS 6.0 (No need to set the run 32 bits apps).
Regsvr32 failed due to Entrypoint was not found.
Try to use regasm, succesfuly registered but not success, still send the same error.
Check the regedit, found the CLSID, check the value of Default under InProcServer32.
Try to use Gacutil, not success
Copy the dll into System32 folder
Gave FULL permissions on EVERY folder involved or suggested
The weird thing, i got the dll under the BIN folder, so, why it need to be registered?
Any suggestion would be appreciated
Since you have tried all the possible culprits, try running regmon and see the dependent DLLs being referenced by the base DLL. and for each of those DLLs, find if the registry entries/registration etc. exist.
I'm pulling my hair out on this one...
I have a legacy application I built a few years ago that uses AutoItX - all working fine.
The time has come to try and update the app, so I've upgraded it to VS2012/.NET4 and I simply cannot get a reference to the AutoItX library to work.
I have installed the application, have registered the dll with regsvr32, tried every combination of property settings on the reference itself (Embed Interop Types / Isolated), but no joy.
The error I keep getting whenever I try and create an AutoItX3 object is:
Retrieving the COM class factory for component with CLSID
{1A671297-FA74-4422-80FA-6C5D8CE4DE04} failed due to the following
error: 80040154 Class not registered (Exception from HRESULT:
0x80040154 (REGDB_E_CLASSNOTREG)).
Is it an issue that I'm on a 64-bit machine? I'm not trying to use the 64-bit DLL version.
Okay the solution was:
Open up regedit*32 (c:\windows\syswow64\regedit)
Search for AutoItX in HKEY_CLASSES_ROOT\AppID
I found it in HKEY_CLASSES_ROOT\AppID{6E8109C4-F369-415D-AF9A-2AEEFF313234}
Create a blank REG_SZ (String) entry called DllSurrogate
For some reason, this completely solved the issue.
Reference: How to use a 32 bit COM object on Windows Server 2008 (works on 2008 R2 but non 2008)
Hainesy,
do you use a x64-Windows?
I had the same problem when I was starting to have a look at COM.
If so, you should try to register your class in HKEY_LOCAL_MACHINE\SOFTWARE\WoW6432Node\Classes...
Give it a try!
Greeting
I'm getting this error when running a C# Windows Forms application:
Retrieving the COM class factory for component with CLSID {} failed
due to the following error: 80040154 Class not registered (Exception
from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
This is appearing in the IDE on 32-bit Windows XP. The COM component in question is a 3rd party dll which is definitely registered ok on the machine in question. My project is targetting x86 ok. I only seem to get the error when instantiating a particular class of the component, other classes that I use are working fine.
I've tried with the component just added directly as a reference and have also created an interop assembly and referenced that but get the same result. Have unregistered and reregistered the component using regsvr32 to no avail.
If I reference the same component in a VB6 application and instantiate the same class it works fine! I am thoroughly confused, can anyone offer any suggestions which might help me out?!
Thank you.
I got this working by changing the instantiating line from:
Component.MyObject test = new Component.MyObject();
to
Component.MyObject test;
Not sure at this stage why that should work but it does so I can carry on! I'm still instantiating the other classes used with the new keyword.
I'm trying to use the Mailroom Toolkit from Satori to standardize addresses, but every time I try to instantiate an instance of ZIPAssembly, I get the following exception.
{Satori.MailRoomToolKit.US.USException (0x80040154 from
ZIPAssembly::.ctor): Retrieving the COM class factory for component
with CLSID {E1DD1DB5-CEAD-4C36-B2E1-EDEC0DA4C1AC} failed due to the
following error: 80040154 Class not registered (Exception from
HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)). at
Satori.MailRoomToolKit.US.Interfaces.ZIPAssembly..ctor()
I've tried regsvr32, but I get the message The module "MRTKUSAssembly.dll" was loaded but the entry-point DllRegisterServer was not found.
I've also tried setting my project target to x86, but that doesn't do it either. Any other ideas? Similar posts have not helped.
Note that I'm running on a 64bit machine and have tried setting my project target to x86 running in the visual studio web server, and setting my project as AnyCPU and running under IIS.
It turns out in this case with the Mailroom Toolkit from Satori, you have to run an install locally before you can use the dll. Seems there are some underlying com components that the dll requires and those need to get installed/registered.
If you are sure that this is the assembly where class factory resides in it means that it's a .net assembly that needs registering as COM component. You should look into regasm.
If it does work in Visual Studio it could be that Visual Studio did this registration for you, but you'll have to do this yourself in your deploy environment.