I have a COM object I imported in my test C# solution. Everything works fine and continues to do so.
Then I imported the same COM object in my actual solution and as a test implemented the exact same lines as in the test project.
When I run the real project I get an InvalidCastException
Unable to cast COM object of type 'CTWebReport.WebReportCOMClass' to interface type 'CTWebReport.IWebReportCOM'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{5DFA18E8-4E71-4ADC-A812-6B166C242561}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
I searched my entire system for every reference to the interop and com library, this includes all the bin and obj folders I could find.
Except for the original COM library I deleted them all and for good measure cleaned out my recycle bin.
No difference, exact same situation. Test project works, real project doesn't.
EDIT
It seems that the COM works in winforms applications, but not in my class librar (that is consumed by an asp.net mvc web applicatoin).
I don't know what to do next. Suggestions?