Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to cast COM object of type 'AccpacCOMAPI.AccpacSessionClass'

Status
Not open for further replies.

NewCCTech

Technical User
Feb 18, 2010
65
CA
Hi,

I am tryin gto update Item Pricing, everything works very well on my machine, but when I tryied to deploy it to the server which Accpac is installed on, I got the following error---

"System.InvalidCastException: Unable to cast COM object of type 'AccpacCOMAPI.AccpacSessionClass' to interface type 'AccpacCOMAPI.IAccpacSession'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{B3B13603-A675-11D2-9B95-00104B71EB3F}' failed due to the following error: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)). at AccpacCOMAPI.AccpacSessionClass.Init(String ObjectHandle, String AppID, String ProgramName, String AppVersion) at Accpac_Interface.PurchaseOrder..ctor(w_test aWin)"


I have even copied the OCX from the server to my PC, then built my program and installed it on the server, but still same problem.

Anyone has any ideal? Thanks in advance!

 
Thanks tuba2007!

Yes, it is.

on my PC, I am using 30-days trial version, I thought maybe it was the reason, then I copied IC1110.OCX from server to my PC, rebiult my program, and installed it on the server, still no luck.
 
Thanks tuba2007!

My problem got solved. I copied the Interop.AccpacCOMAPI.dll from server to my machine and added it to my project, reinstalled the program to server, then it worked.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top