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


Michael Lang
-- Copied from [aspngfreeforall] to [aspngvs] by Tim <Click here to reveal e-mail address> --

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...
 
    
Brian Weeres
I haven't had that problem because I just use VS.NET to debug components
developed in VC6. In your project properties->Configuration properties
Set Enable Unmanaged Debugging to true and you will step right into your
components. I'm not sure this will work for VB components but I assume
so.

Brian

-----Original Message-----
From: Michael Lang [mailto:Click here to reveal e-mail address]=20
Sent: Friday, July 26, 2002 4:54 AM
To: aspngvs
Subject: [aspngvs] Unable to debug VB COM object from ASP.NET

-- Copied from [aspngfreeforall] to [aspngvs] by Tim
<Click here to reveal e-mail address> --

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:-=20
=20
System.InvalidCastException: QueryInterface for interface
OurComInteropNamespace._aClassFromOurCOMObject failed
=20
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 ?
=20
Is there a work around ?

Michael Lang=20
Fusion Technology Group=20
Phone: +61 (0)417 498 620
| [aspngvs] member Click here to reveal e-mail address =3D YOUR ID
| http://www.asplists.com/asplists/aspngvs.asp =3D JOIN/QUIT
| http://www.asplists.com/search =3D SEARCH Archives

Reply to this message...
 
    
Michael Morisoli
From my limited experience in .NET or even otherwise the only way I have
found to debug VB COM objects is to create some simple VB form to
"exercise" the COM object. Save the tester form as a VB group and you
can step thru each line of setting properties, methods so on.

hth

-----Original Message-----
From: Michael Lang [mailto:Click here to reveal e-mail address]=20
Sent: Friday, July 26, 2002 2:54 AM
To: aspngvs
Subject: [aspngvs] Unable to debug VB COM object from ASP.NET

-- Copied from [aspngfreeforall] to [aspngvs] by Tim
<Click here to reveal e-mail address> --

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:-=20
=20
System.InvalidCastException: QueryInterface for interface
OurComInteropNamespace._aClassFromOurCOMObject failed
=20
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 ?
=20
Is there a work around ?

Michael Lang=20
Fusion Technology Group=20
Phone: +61 (0)417 498 620
| [aspngvs] member Click here to reveal e-mail address =3D YOUR ID
| http://www.asplists.com/asplists/aspngvs.asp =3D JOIN/QUIT
| http://www.asplists.com/search =3D 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