# Unable to cast COM object
Source: https://www.desktopaccountingapi.com/docs/help/connection-errors/com-object-error/

> Fix the Web Connector error "Unable to cast COM object" by repairing QuickBooks components and running both programs at the same permission level.

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

The Web Connector shows a long technical message that starts with "Unable to cast COM object of type 'System.__ComObject'". It often mentions `QBXMLRP2` and ends with "No such interface supported". 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

- 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

1. 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](https://www.desktopaccountingapi.com/docs/help/guides/run-as-administrator/).
2. Install the latest release update for your QuickBooks version. In QuickBooks, choose **Help › Update QuickBooks Desktop**, then restart the computer.
3. 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.
4. Intuit also publishes repair tools for QuickBooks installation problems. Your IT person can use them if the repair in step 3 does not help.
5. If more than one QuickBooks version is installed, remove the unused ones, then repair the remaining one. See [Keep one QuickBooks version installed](https://www.desktopaccountingapi.com/docs/help/guides/one-quickbooks-version/).

### For IT staff

The component involved is the QuickBooks request processor, `QBXMLRP2.dll`, installed under the Intuit common files folder. Re-registering it with the 32-bit `regsvr32` from an elevated prompt, followed by a restart, fixes the error when a repair install does not. Make a full backup first, and only change systems you manage.

## 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

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

- [Windows asks to allow this app to make changes](https://www.desktopaccountingapi.com/docs/help/connection-errors/windows-permission-prompt/)
- [QuickBooks could not be started](https://www.desktopaccountingapi.com/docs/help/connection-errors/cannot-start-quickbooks/)
- [Repair a damaged company file](https://www.desktopaccountingapi.com/docs/help/guides/repair-company-file/)

For developers, see [`QBD_CONNECTION_ERROR`](https://www.desktopaccountingapi.com/docs/errors/#qbd_connection_error).
