Dave Gahan
Dave Gahan

Reputation: 299

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 -

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.

Thx

Upvotes: 2

Views: 3598

Answers (1)

Dave Gahan
Dave Gahan

Reputation: 299

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.

Upvotes: 1

Related Questions