Could not read key from registry (Exception from HRESULT: 0x80040150 (REGDB_E_READREGDB)) at Interop.QBFC13.IQBSessionManager

-1

During a deployment of an update to our Web Service that QuickBooks Web Connector calls, we are not having a bunch of issues related to the Interop.QBFC13.IQBSessionManager. Note our code all works in development environment and has worked in the past on our production server.

We are running on a 64 bit Windows 2016 server, but are running the IIS site for our web service as 32bit and did compile the project as x86 and verified the dlls are x86.

We started with this error, then added the App Pool Identity permission to the registry keys associated with this class Id/

Error message: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.InvalidCastException: Unable to cast COM object of type 'Interop.QBFC13.QBSessionManagerClass' to interface type 'Interop.QBFC13.IQBSessionManager'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{50F59D7F-4E65-45D8-8F19-135F9FE05296}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

After that, the error message changes from No such interface supported... to Library Not Registered.

Now its giving

System.Runtime.InteropServices.COMException: Could not read key from registry (Exception from HRESULT: 0x80040150 (REGDB_E_READREGDB)) at Interop.QBFC13.IQBSessionManager.CreateMsgSetRequest

But it doesn't state which registry key it is trying to read.

It is always at the same place in our code where the error is triggered:

IMsgSetRequest msgSetRq = sessMgr.CreateMsgSetRequest(qbXMLCountry, (Int16)qbXMLMajorVers, (Int16)qbXMLMinorVers);

We've tried uninstalling, re-installing the QB SDK, QBFC13_0Installer.exe and QBXMLRP2Installer.exe...all with reboots after uninstalling and reinstalling.

c#
quickbooks
qbfc
asked on Stack Overflow Nov 12, 2019 by crichavin • edited Nov 13, 2019 by halfer

1 Answer

1

Not really the answer to the actual problem, but you can usually figure out permission (and other) issues with registry by using Process Monitor.

The actual problem seemed to have been that IIS APPPool did not have proper rights for the registry key.

answered on Stack Overflow Nov 14, 2019 by James Z

User contributions licensed under CC BY-SA 3.0