Unable to debug VB COM object from ASP.NET
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngdebug' list.


Michael Lang
We have a VB6 COM object that we've developed that we're accessing from an ASP.NET application. Whilst debugging an ASP.NET application we are getting an exception when we attempt to step from the .NET debugger into the COM object in VB6 (ie... by running the COM control within VB6 with a break point set). It doesn't seem like .NET can resolve the COM object whilst it's being run in VB. The exception is as follows:-

System.InvalidCastException: QueryInterface for interface OurComInteropNamespace._aClassFromOurCOMObject failed

This exception only occurs when we attempt to debug the COM in VB6 whilst debugging the ASP.NET application calling it.
Has anyone else encountered such a problem ?

Is there a work around ?

Michael Lang
Fusion Technology Group
Phone: +61 (0)417 498 620
Reply to this message...
 
    
Ries Vriend
I've got the same problem. The only workaround I know of is declaring
all your COM object references in VB.NET 'As Object', disable 'option
strict' and thus use late-binding. Big drawback is that you cannot pass
UDT's/structs from VB6 to .net using late binding.

Hope this helps.

Ries

-----Original Message-----
From: Michael Lang [mailto:Click here to reveal e-mail address]
Sent: vrijdag 26 juli 2002 11:54
To: aspngdebug
Subject: [aspngdebug] Unable to debug VB COM object from ASP.NET

We have a VB6 COM object that we've developed that we're accessing from
an ASP.NET application. Whilst debugging an ASP.NET application we are
getting an exception when we attempt to step from the .NET debugger into
the COM object in VB6 (ie... by running the COM control within VB6 with
a break point set). It doesn't seem like .NET can resolve the COM
object whilst it's being run in VB. The exception is as follows:-

System.InvalidCastException: QueryInterface for interface
OurComInteropNamespace._aClassFromOurCOMObject failed

This exception only occurs when we attempt to debug the COM in VB6
whilst debugging the ASP.NET application calling it.
Has anyone else encountered such a problem ?

Is there a work around ?
Michael Lang
Fusion Technology Group
Phone: +61 (0)417 498 620

| [aspngdebug] member Click here to reveal e-mail address = YOUR ID |
http://www.asplists.com/asplists/aspngdebug.asp = JOIN/QUIT |
http://www.asplists.com/search = SEARCH Archives
Reply to this message...
 
 
System.InvalidCastException




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com