Unable to cast COM object - error: No such interface supported


I've got this annoying issue in here when using a VB6 DLL (AB5COM.dll) in my webAPI project. All is working fine in my local VS2015. The problem occurs only in my remote IIS 7.5 (Win2008 R2) after deploying the published site. I'm using this DLL in 2 projects of my solution.

I've tried several things -

  • Generating interop.AB5COM
  • Disable embed and copy local
  • platform change to x86
  • APP POOL supports 32bit
  • [assembly: ComVisible(true)]
  • Adding [Guid("xxxxxxx-xxxxx-xxxxxx-xxxxxx")] as attribute in my class

All was useless. Local VS2015 works, remote IIS7.5 fails with this exception.

System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'AB5COM.trxAB5core'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{AF42661C-D369-454A-A005-55D51037166A}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

I also can't find which DLL I need to register using regsvr32 since the COM dll isn't published, and the interop cannot be registered.

Would appreciate your help on this.


asked on Stack Overflow Mar 20, 2017 by Dave Gahan

1 Answer


Ok, since no answer on this, I had to make some moves... The remote IIS environment is my TEST server, so I've installed VS2017 with my solution, ran my app (success) and published (success). So currently I have no issues with this COM DLL which brings the conclusion that this is a pure REGISTRY issue. The VS2015 knows how to register the correct DLL and then all works perfectly. Now, I need to figure how to make this working on my Production...

Although this is NOT a proper solution, I hope my personal post helps anyone.

answered on Stack Overflow Mar 23, 2017 by Dave Gahan

User contributions licensed under CC BY-SA 3.0