1
votes

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.

Thx

1
Does anyone can assist on this...?Dave Gahan
What do you mean by "the COM dll isn't published".Phil Jollans
I meant that when I publish the project, the BIN folder doesn't have neither the COM dll nor any interop.COM dll. However, I assume that my project DLL has a reference to a physical location where the COM DLL resides (this is my assumption only).Dave Gahan
You must have both the COM dll and the interop dll on the target machine. It doesn't really matter where the COM dll is, providing it has been registered with RegSvr32. The interop dll is a .NET component and it should normally be in your bin folder.Phil Jollans

1 Answers

0
votes

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.