Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Im initializing a session

session.Init("", "XX", "XX001", "62");

but I get below error

System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID 
{13898C04-C674-4B4E-B5C0-D78AF3E566CA} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
   at ACCPAC.Advantage.Server.Session..ctor(Int32 key)
   at ACCPAC.Advantage.Session.Init(String objectHandle, String appID, String programName, String appVersion)
   at ITS.Accpac.Components.AccpacBase.ProcessInvoices() in c:\IBS_Dev\ITSAccpacBillingConsoleApp1\ITS.Accpac\Components\Base\AccpacBase.cs:line 372}


What I have tried:

I have tried to change the target platform to x86
Posted
Updated 28-Nov-19 3:38am
v2
Comments
Richard MacCutchan 28-Nov-19 4:30am    
The message is clear; the system cannot find a registration entry for the class you are trying to connect to.
Member 14370529 28-Nov-19 4:49am    
@Richard MacCutchan, Any idea how can I solve this issue?
phil.o 28-Nov-19 5:16am    
Yep: identify the dll which should be registered and which is not, and register it. Or ask some support from the editor of the product you are trying to use.

1 solution

It's trying to tell you that the library you're trying to use isn't installed on the machine.

Either that, or there something wrong with your setup where it cannot create an instance of the class you're trying to use. Possibly a dependency is missing (like a C++ runtime) or permissions on the account running the code need to be changed.

Your BEST source of information on this problem is going to be the people that wrote the library.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900