473,387 Members | 1,486 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,387 software developers and data experts.

calling COM object errors

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

Nov 18 '05 #1
2 1147
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.
"Bruce Whitehouse" <sk*******@yahoo.co.uk> wrote in message
news:Oh*************@TK2MSFTNGP11.phx.gbl...
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

Nov 18 '05 #2
this turned out to be a permissions problem

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

Bruce
Nov 18 '05 #3

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

Similar topics

6
by: dw | last post by:
Hello all, I'm having a dickens of a time calling a stored procedure on a connection. Every time I do, it generates an error "Arguments are of the wrong type, are out of acceptable range, or are in...
14
by: Michael Winter | last post by:
In an attempt to answer another question in this group, I've had to resort to calling the DOM method, Node.removeChild(), using a reference to it (long story...). That is, passing Node.removeChild....
10
by: JKop | last post by:
Anyone know a way of calling a constructor? At first, I was going to post the following code and ask if it was fully portable and all, but then it wouldn't compile. #include <cstdlib> ...
12
by: johny smith | last post by:
I am trying to figure out a way to print the address of what called a certain function once inside the function. I am assuming that this information is on the stack somewhere. But can someone...
4
by: Jack | last post by:
Hi, I am trying to run an example code from a book. However I am getting the following error message: Number: -2147217900 Description: Syntax error or access violation Source: Microsoft OLE...
6
by: Rob Cowie | last post by:
Hi all, Is there a simple way to call every method of an object from its __init__()? For example, given the following class, what would I replace the comment line in __init__() with to result...
5
by: Newbie Coder | last post by:
Hello all I have 3 functions in a javacrip file (MyScript.js), which is added to an ASP.NET 2.0 project 1) no right-click 2) no select text (copy...) 3) History.Back()' How do I call...
7
by: Andreas Reiff | last post by:
Hey! I have a managed c++ app (actually, the app is mixed managed/unmanaged, but this happens in the managed part) that dynamically generates some program in c# (with CSharpCodeProvider). The...
4
by: Dan | last post by:
Hi All, I've got a problem with my C++ application that calls a Java class that I've built with GCJ, I can't run it because I get errors: multiple definition of `atexit' first defined here...
8
by: Derek Hart | last post by:
I am unclear about what all the requirements are to call a simple vb.net application, installed in the GAC, from COM (such as writing vba in Word to call the dotnet dll). I believe I have...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...

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.