I have a COM object that I imported into my C # test solution. Everything is working fine and continues to do so.
Then I imported the same COM object into my actual solution, and the exact strings were implemented as a test, as in a test project.
When I run a real project, I get an InvalidCastException
Cannot pass a COM object of type "CTWebReport.WebReportCOMClass" to the interface type "CTWebReport.IWebReportCOM". This operation failed because a call to the QueryInterface COM component for the interface with IID '{5DFA18E8-4E71-4ADC-A812-6B166C242561} failed due to the following error: this interface is not supported (exception from HRESULT: 0x80004002 (E_NOINTERFACE)) .
I searched my entire system for every link to the interop and com library, including all the bin and obj folders that I could find. With the exception of the original COM library, I deleted them all and emptied the trash for good measure. No difference, exactly the same situation. The test project works, there is no real project.
EDIT
COM seems to work in winforms applications, but not in my librar class (which is consumed by the asp.net mvc web app).
I do not know what to do next. Suggestions?
Boris Callens
source share