473,394 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Exception Details: System.InvalidCastException: QueryInterface for interface MyObject._MyCls failed

Ram
I am running a test web site on my own Win2k professional computer. I
have a VB6 COM component (running on COM+) on a seperate application runnint
as "Server".
When running an ASP.NET page calling this component, it works fine, but When
I try and debug the Com+ process using the VB6.0 IDE, I get the following
error:
"Exception Details: System.InvalidCastException: QueryInterface for
interface MyObject._MyCls failed."
When I the same thing on a test app I created using VB.NET, all works fine
and I can debug the VB6.0 component.

Any ideas on where/what to look for?
Thanks ahead

-- Ram


Nov 16 '05 #1
4 4884
Remove the inheritence from ServicedComponent (replace with
MarshalByRef or something similar) and you should be able to debug into it

--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "
"Ram" <ni***@bezeqint.net> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
I am running a test web site on my own Win2k professional computer. I
have a VB6 COM component (running on COM+) on a seperate application runnint as "Server".
When running an ASP.NET page calling this component, it works fine, but When I try and debug the Com+ process using the VB6.0 IDE, I get the following
error:
"Exception Details: System.InvalidCastException: QueryInterface for
interface MyObject._MyCls failed."
When I the same thing on a test app I created using VB.NET, all works fine
and I can debug the VB6.0 component.

Any ideas on where/what to look for?
Thanks ahead

-- Ram

Nov 16 '05 #2
Ram
Inheritance from ServicedComponent?
My object that sits in the Com+ is the VB6.0 one, not the .NET...
Thanks for the reply

-- Ram
"Tamir Khason" <ta**********@tcon-NOSPAM.co.il> wrote in message
news:Os**************@tk2msftngp13.phx.gbl...
Remove the inheritence from ServicedComponent (replace with
MarshalByRef or something similar) and you should be able to debug into it

--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "
"Ram" <ni***@bezeqint.net> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
I am running a test web site on my own Win2k professional computer. I
have a VB6 COM component (running on COM+) on a seperate application

runnint
as "Server".
When running an ASP.NET page calling this component, it works fine, but

When
I try and debug the Com+ process using the VB6.0 IDE, I get the following error:
"Exception Details: System.InvalidCastException: QueryInterface for
interface MyObject._MyCls failed."
When I the same thing on a test app I created using VB.NET, all works fine and I can debug the VB6.0 component.

Any ideas on where/what to look for?
Thanks ahead

-- Ram


Nov 16 '05 #3
Do it in class (ASP.NET as far as I understand) wich calls your VB COM+

--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "
"Ram" <ni***@bezeqint.net> wrote in message
news:uv**************@TK2MSFTNGP09.phx.gbl...
Inheritance from ServicedComponent?
My object that sits in the Com+ is the VB6.0 one, not the .NET...
Thanks for the reply

-- Ram
"Tamir Khason" <ta**********@tcon-NOSPAM.co.il> wrote in message
news:Os**************@tk2msftngp13.phx.gbl...
Remove the inheritence from ServicedComponent (replace with
MarshalByRef or something similar) and you should be able to debug into it

--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "
"Ram" <ni***@bezeqint.net> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
I am running a test web site on my own Win2k professional computer. I
have a VB6 COM component (running on COM+) on a seperate application

runnint
as "Server".
When running an ASP.NET page calling this component, it works fine,
but When
I try and debug the Com+ process using the VB6.0 IDE, I get the

following error:
"Exception Details: System.InvalidCastException: QueryInterface for
interface MyObject._MyCls failed."
When I the same thing on a test app I created using VB.NET, all works fine and I can debug the VB6.0 component.

Any ideas on where/what to look for?
Thanks ahead

-- Ram



Nov 16 '05 #4
Ram
I added a class to my ASP.NET project that inherits from the
MarshalByRefObject, and on the Page_Load, I call a shared function inside
this Class, and still the same results...
Any Ideas?

--Ram
"Tamir Khason" <ta**********@tcon-NOSPAM.co.il> wrote in message
news:ur**************@tk2msftngp13.phx.gbl...
Do it in class (ASP.NET as far as I understand) wich calls your VB COM+

--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "
"Ram" <ni***@bezeqint.net> wrote in message
news:uv**************@TK2MSFTNGP09.phx.gbl...
Inheritance from ServicedComponent?
My object that sits in the Com+ is the VB6.0 one, not the .NET...
Thanks for the reply

-- Ram
"Tamir Khason" <ta**********@tcon-NOSPAM.co.il> wrote in message
news:Os**************@tk2msftngp13.phx.gbl...
Remove the inheritence from ServicedComponent (replace with
MarshalByRef or something similar) and you should be able to debug into
it

--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "
"Ram" <ni***@bezeqint.net> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
> I am running a test web site on my own Win2k professional computer.
I > have a VB6 COM component (running on COM+) on a seperate application
runnint
> as "Server".
> When running an ASP.NET page calling this component, it works fine, but When
> I try and debug the Com+ process using the VB6.0 IDE, I get the

following
> error:
> "Exception Details: System.InvalidCastException: QueryInterface for
> interface MyObject._MyCls failed."
> When I the same thing on a test app I created using VB.NET, all

works fine
> and I can debug the VB6.0 component.
>
> Any ideas on where/what to look for?
> Thanks ahead
>
> -- Ram
>
>
>
>



Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Tao | last post by:
I just upgraded .NET framework to 1.1 and VS.Net to 2003 version and tried to test it out. I created an ASP.NET project using the wizard and tried to run it by hitting "F5". I got an exception:...
0
by: Jason | last post by:
I'm writing a small console app in .NET that needs to reference a 3rd party dll. I wrote the app by adding a reference to the 3rd party dll in my project and my code builds and executes...
4
by: Mark | last post by:
I have a COM object that calls into a C# Forms library. The library can throw exceptions and I want to handle the exceptions in COM. Adam Nathan wrote a Microsoft sponsored book titled .Net and Com...
1
by: adiel_g | last post by:
Hello, I have created a activeX dll in vb6 that contains some functions I am using in .NET. I created the dll in vb6 with: Instancing = 5-Multiuse MTSTransactionMode = 2-RequiresTransaction...
2
by: Michael | last post by:
Hello all and thanks in advance, I'm running a vb.net program and part of it copies files from one server to another. It generally works fine but once in a while I get this error: ...
0
by: Ram | last post by:
I am running a test web site on my own Win2k professional computer. I have a VB6 COM component (running on COM+) on a seperate application runnint as "Server". When running an ASP.NET page calling...
3
by: Richard | last post by:
I have created a Windows service which performs various functions including setting variables in other application objects. When the service runs under Local System account the functionality all...
1
by: Ratz | last post by:
Hello everyone! I'm new to this Forum! I've spent about 56 hours trying to solve a .NET VB Runtime error while Using a program.Ive contacted the developer of the program and he could not figure out...
3
by: =?Utf-8?B?a2FyaW0=?= | last post by:
Hi, My .Net application call a COM Class method. The signature of COm method is object get_Item(ref object Key); This method had defined in "NCR.APTRA.AXFS" namespace and I Have "formList" of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.