calling COM object errors

  • Thread starter Bruce Whitehouse
  • Start date
B

Bruce Whitehouse

I've an appartment threaded VB6 COM object thats been configured in COM+ to
run under a specific domain user.

I've tried instantiating the object in my VB.NET class and I get the
following error....
------------------------------------------------------------------------
----------------------------
A first chance exception of type 'System.InvalidCastException' occurred
in gbasvr07.dll

Additional information: QueryInterface for interface ALFA._Sage failed.
------------------------------------------------------------------------
----------------------------

If I continue, I eventually get the message (in the browser)

------------------------------------------------------------------------
----------------------------
Server Error in '/' Application.
QueryInterface for interface ALFA._Sage failed.
Description: An unhandled exception occurred during the execution of the
current
web request. Please review the stack trace for more information about
the error and
where it originated in the code.

Exception Details: System.InvalidCastException: QueryInterface for
interface
ALFA._Sage failed.

------------------------------------------------------------------------
----------------------------

If I try to catch the exception, I get "Thread was being aborted" as the
exception message.


I've been searching for answers and it seems to point to the threading, but
all options I've seen state that aspcompt must be set to true, which it is.

Does anyone have any idea why I'm getting this? BTW - it worked the first
time I ran the page!
regards,
Bruce
 
M

Martin

The idea I am getting is that you treat something as InProc in your
component's initialisation code that blows when the component is
instantiated as local or remote. If the component has dual interfaces you
may get away with it when it is instantiated as an InProc server using the
VTable interface. Check your component's startup code (debug it or set some
MessageBox statements) to see where it blows. Then ask yourself "where is
this variable/data located?" You may be casting an interface to some value
type.
 
B

Bruce Whitehouse

this turned out to be a permissions problem

....? these error messages are almost as helpful as Oracles! :)

Bruce
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top