Click to See Complete Forum and Search --> : ASP.NET error calling COM method from Web Application


navkola
July 16th, 2008, 08:39 AM
Hello,
I have a custom COM(VC++) dll which I need to use in a C#.NET project. I have created a RCW for that COM dll. In a .NET Windows Application (after adding a reference to the RCW), I am able to create a
object of that type and successfully call a method on that object. However when I call a method on the RCW in a .NET Web Application or a Web Service Application, I get an error (Unable to cast COM object of type..to interface type..This operation failed because the QueryInterface call on the COM component for the interface with IID '{07388321-0E7D-11D1-A1AD-00A024E2CDFE}' failed due to the following error: No such interface supported). Based on the text displayed in the Output window, it appears that the Web Application is not loading the RCW or the original COM dll. The Windows Application does load both the RCW and the original COM dll into memory. I am using Microsoft .NET Framework Version 2.0, Windows XP and IIS 5.1 (local). Where does IIS look for that dll?

I would really appreciate it if anybody has any suggestions regarding potential solutions to this issue.



Thanks in advance,

Navin