Unable to cast COM object
The Web Connector talks to QuickBooks through a set of Windows components that QuickBooks installs. This error means those components are damaged, missing or not registered, so the Web Connector cannot reach QuickBooks at all.
What you see
Section titled “What you see”The Web Connector shows a long technical message. Its wording depends on what is wrong with the components.
When a component is not registered, the app’s row shows “Last result: Application requested to abort” in the Status column. Click the row’s status to open the Last Result window. Its description reads:
Error connecting to QuickBooks. Error message received from QuickBooks was <Retrieving the COM class factory for component with CLSID {45F5708E-3B43-4FA8-BE7E-A5F1849214CB} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).>. Application has sent back a DONE via connectionError. More information in available in the log file (click View Log button from main window). Update aborted per request from application.
The Web Connector log (C:\ProgramData\Intuit\QBWebConnector\log\QWCLog.txt) shows the same text after QBWC1013: Error connecting to QuickBooks.
When a component is registered but damaged, the message starts with “Unable to cast COM object of type ‘System.__ComObject’” instead. It often mentions QBXMLRP2 and ends with “No such interface supported”.
In both cases the app shows that QuickBooks Desktop could not be opened on the computer that runs it:
QuickBooks Desktop could not be opened on the computer that runs it. Make sure QuickBooks is installed and the company file opens normally.
Why it happens
Section titled “Why it happens”- A QuickBooks installation, update or uninstall did not finish cleanly, and the components the Web Connector uses were left unregistered.
- An older QuickBooks version was removed and took shared components with it, while a newer version is still installed.
- QuickBooks and the Web Connector run at different permission levels, so one cannot see the components the other registered.
How to fix it
Section titled “How to fix it”- Check the permission levels first, because it is the quickest fix. QuickBooks and the Web Connector both start normally, or both with Run as administrator. See Run QuickBooks and the Web Connector at the same permission level.
- Install the latest release update for your QuickBooks version. In QuickBooks, choose Help › Update QuickBooks Desktop…, then restart the computer.
- Repair the QuickBooks installation. Close QuickBooks, open Windows Settings › Apps, or Control Panel › Programs and Features on older Windows, select QuickBooks and choose to change or repair it. Follow the prompts, then restart the computer.
- Intuit also publishes repair tools for QuickBooks installation problems. Your IT person can use them if the repair in step 3 does not help.
- If more than one QuickBooks version is installed, remove the unused ones, then repair the remaining one. See Keep one QuickBooks version installed.
For IT staff
Section titled “For IT staff”The component involved is the QuickBooks request processor, QBXMLRP2.dll, installed under the Intuit common files folder. QuickBooks Desktop 2024 installs two copies, each registered for its own bitness: a 64-bit one in C:\Program Files\Common Files\Intuit\QuickBooks\QBXMLRP2.dll and a 32-bit one in C:\Program Files (x86)\Common Files\Intuit\QuickBooks\QBXMLRP2.dll. The Web Connector is a 32-bit program and uses the 32-bit copy. When that copy is not registered, the Web Connector reports “80040154 Class not registered”. Re-registering it with the 32-bit regsvr32 fixes the error when a repair install does not. Make a full backup first, and only change systems you manage.
-
Close QuickBooks, and close the Web Connector with File › Exit.
-
Open Command Prompt with Run as administrator and run the 32-bit
regsvr32on the 32-bit copy:C:\Windows\SysWOW64\regsvr32.exe "C:\Program Files (x86)\Common Files\Intuit\QuickBooks\QBXMLRP2.dll" -
Open QuickBooks and the company file, start the Web Connector from the Start menu, and click Update Selected.
If regsvr32 reports an error, repair the QuickBooks installation as in step 3 above instead.
How to check it worked
Section titled “How to check it worked”Open QuickBooks and the company file, then click Update Selected in the Web Connector. The app’s row finishes without the COM error, and the app’s next action goes through.
When to contact the app’s support
Section titled “When to contact the app’s support”Contact them if the error remains after a repair and a restart. Send the time, the full error text, your QuickBooks edition, year and release from the Product Information window (press F2 in QuickBooks), and a screenshot of the app’s row in the Web Connector window.
Related pages
Section titled “Related pages”- Windows asks to allow this app to make changes
- QuickBooks could not be started
- Repair a damaged company file
For developers, see QBD_CONNECTION_ERROR.