MTS & Custom Interface 
Author Message
 MTS & Custom Interface

Hello everybody.  I'm having a problem using a custom interface with an
object in MTS.  I have a bunch of Query objects in my MTS package, and they
all implement my IQuery interface, which I defined in a separate TLB.  In
another package, I have a Server object, which uses the various Query
objects via this IQuery interface.  Finally, on the client machine, I have
an object which uses the Server object remotely.

When the client calls the Execute method on the server object, an error is
raised inside the server object:

"Automation error:  Interface not registered."

This error is passed back to the client in a special Recordset object.  This
error is frustrating because I don't know how to fix it.  The TLB was
registered on the server machine before I created my MTS packages.

The Server.Execute() method looks like this:

Public Function Execute(ByVal sObjectName As String) As ADODB.Recordset
    Dim oQuery As MyLibrary.IQuery

    Set oQuery = CreateObject(sObjectName)
    Set Execute = oQuery.Execute()
End Function

Here is some more information, which may help you figure out my problem:

- I am using Windows NT 4.0, with the Option Pack
- When I add the Server component and the various Query components to MTS,
they do not have any interfaces.  I expected to see _Server for the Server
object, and IQuery for the Query objects, in addition to their
object-specific interfaces.  But there are no interfaces listed at all.
This seems very strange to me!
- If I use the Server object from a program running on the server machine,
then everything is fine.
- I registered the IQuery interface on the client machine, just to be
sure... still no good.

I would really appreciate any input on this, because I'm totally stumped.

-- Matthew Solnit



Sat, 28 Dec 2002 03:00:00 GMT  
 MTS & Custom Interface
Hi Matthew,

Your problem is that you aren't seeing any interfaces at all when you
register your components in MTS.  If you browse to your object with OLEView,
do you see your interfaces there?

This issue spreads down to your client.  I presume your DCOM implementation
is through an MTS package?  If MTS isn't seeing your interfaces, than the
proxy-stub code it creates won't know of them either.  You need to resolve
it on your server machine.

Chris Jackson


Quote:
> Hello everybody.  I'm having a problem using a custom interface with an
> object in MTS.  I have a bunch of Query objects in my MTS package, and
they
> all implement my IQuery interface, which I defined in a separate TLB.  In
> another package, I have a Server object, which uses the various Query
> objects via this IQuery interface.  Finally, on the client machine, I have
> an object which uses the Server object remotely.

> When the client calls the Execute method on the server object, an error is
> raised inside the server object:

> "Automation error:  Interface not registered."

> This error is passed back to the client in a special Recordset object.
This
> error is frustrating because I don't know how to fix it.  The TLB was
> registered on the server machine before I created my MTS packages.

> The Server.Execute() method looks like this:

> Public Function Execute(ByVal sObjectName As String) As ADODB.Recordset
>     Dim oQuery As MyLibrary.IQuery

>     Set oQuery = CreateObject(sObjectName)
>     Set Execute = oQuery.Execute()
> End Function

> Here is some more information, which may help you figure out my problem:

> - I am using Windows NT 4.0, with the Option Pack
> - When I add the Server component and the various Query components to MTS,
> they do not have any interfaces.  I expected to see _Server for the Server
> object, and IQuery for the Query objects, in addition to their
> object-specific interfaces.  But there are no interfaces listed at all.
> This seems very strange to me!
> - If I use the Server object from a program running on the server machine,
> then everything is fine.
> - I registered the IQuery interface on the client machine, just to be
> sure... still no good.

> I would really appreciate any input on this, because I'm totally stumped.

> -- Matthew Solnit




Sat, 28 Dec 2002 03:00:00 GMT  
 MTS & Custom Interface

That makes sense.  But I don't know what my problem is on the server
machine.  OLEView shows everything is there.  But MTS shows no interfaces.

Has anybody seen anything like this before?  I'm so confused.

-- Matthew Solnit


Quote:
> Hi Matthew,

> Your problem is that you aren't seeing any interfaces at all when you
> register your components in MTS.  If you browse to your object with
OLEView,
> do you see your interfaces there?

> This issue spreads down to your client.  I presume your DCOM
implementation
> is through an MTS package?  If MTS isn't seeing your interfaces, than the
> proxy-stub code it creates won't know of them either.  You need to resolve
> it on your server machine.

> Chris Jackson



> > Hello everybody.  I'm having a problem using a custom interface with an
> > object in MTS.  I have a bunch of Query objects in my MTS package, and
> they
> > all implement my IQuery interface, which I defined in a separate TLB.
In
> > another package, I have a Server object, which uses the various Query
> > objects via this IQuery interface.  Finally, on the client machine, I
have
> > an object which uses the Server object remotely.

> > When the client calls the Execute method on the server object, an error
is
> > raised inside the server object:

> > "Automation error:  Interface not registered."

> > This error is passed back to the client in a special Recordset object.
> This
> > error is frustrating because I don't know how to fix it.  The TLB was
> > registered on the server machine before I created my MTS packages.

> > The Server.Execute() method looks like this:

> > Public Function Execute(ByVal sObjectName As String) As ADODB.Recordset
> >     Dim oQuery As MyLibrary.IQuery

> >     Set oQuery = CreateObject(sObjectName)
> >     Set Execute = oQuery.Execute()
> > End Function

> > Here is some more information, which may help you figure out my problem:

> > - I am using Windows NT 4.0, with the Option Pack
> > - When I add the Server component and the various Query components to
MTS,
> > they do not have any interfaces.  I expected to see _Server for the
Server
> > object, and IQuery for the Query objects, in addition to their
> > object-specific interfaces.  But there are no interfaces listed at all.
> > This seems very strange to me!
> > - If I use the Server object from a program running on the server
machine,
> > then everything is fine.
> > - I registered the IQuery interface on the client machine, just to be
> > sure... still no good.

> > I would really appreciate any input on this, because I'm totally
stumped.

> > -- Matthew Solnit




Sat, 28 Dec 2002 03:00:00 GMT  
 MTS & Custom Interface
Why do you have your interface in MTS ?

if you get it out of the package and register it on the server as a regular
dll you can reference it from within your components.


Quote:
> Hello everybody.  I'm having a problem using a custom interface with an
> object in MTS.  I have a bunch of Query objects in my MTS package, and
they
> all implement my IQuery interface, which I defined in a separate TLB.  In
> another package, I have a Server object, which uses the various Query
> objects via this IQuery interface.  Finally, on the client machine, I have
> an object which uses the Server object remotely.

> When the client calls the Execute method on the server object, an error is
> raised inside the server object:

> "Automation error:  Interface not registered."

> This error is passed back to the client in a special Recordset object.
This
> error is frustrating because I don't know how to fix it.  The TLB was
> registered on the server machine before I created my MTS packages.

> The Server.Execute() method looks like this:

> Public Function Execute(ByVal sObjectName As String) As ADODB.Recordset
>     Dim oQuery As MyLibrary.IQuery

>     Set oQuery = CreateObject(sObjectName)
>     Set Execute = oQuery.Execute()
> End Function

> Here is some more information, which may help you figure out my problem:

> - I am using Windows NT 4.0, with the Option Pack
> - When I add the Server component and the various Query components to MTS,
> they do not have any interfaces.  I expected to see _Server for the Server
> object, and IQuery for the Query objects, in addition to their
> object-specific interfaces.  But there are no interfaces listed at all.
> This seems very strange to me!
> - If I use the Server object from a program running on the server machine,
> then everything is fine.
> - I registered the IQuery interface on the client machine, just to be
> sure... still no good.

> I would really appreciate any input on this, because I'm totally stumped.

> -- Matthew Solnit




Sun, 29 Dec 2002 03:00:00 GMT  
 MTS & Custom Interface

The interface is not in MTS.  Let me start from scratch.  Here is my
problem.  When I add a component to a package in MTS, the MMC tree shows
nodes for Interfaces and Roles.  I expect to see one or more interfaces in
the Interfaces list.  But the list is empty.  Why is this happening and what
should I do about it?

-- Matthew Solnit


Quote:
> Why do you have your interface in MTS ?

> if you get it out of the package and register it on the server as a
regular
> dll you can reference it from within your components.



> > Hello everybody.  I'm having a problem using a custom interface with an
> > object in MTS.  I have a bunch of Query objects in my MTS package, and
> they
> > all implement my IQuery interface, which I defined in a separate TLB.
In
> > another package, I have a Server object, which uses the various Query
> > objects via this IQuery interface.  Finally, on the client machine, I
have
> > an object which uses the Server object remotely.

> > When the client calls the Execute method on the server object, an error
is
> > raised inside the server object:

> > "Automation error:  Interface not registered."

> > This error is passed back to the client in a special Recordset object.
> This
> > error is frustrating because I don't know how to fix it.  The TLB was
> > registered on the server machine before I created my MTS packages.

> > The Server.Execute() method looks like this:

> > Public Function Execute(ByVal sObjectName As String) As ADODB.Recordset
> >     Dim oQuery As MyLibrary.IQuery

> >     Set oQuery = CreateObject(sObjectName)
> >     Set Execute = oQuery.Execute()
> > End Function

> > Here is some more information, which may help you figure out my problem:

> > - I am using Windows NT 4.0, with the Option Pack
> > - When I add the Server component and the various Query components to
MTS,
> > they do not have any interfaces.  I expected to see _Server for the
Server
> > object, and IQuery for the Query objects, in addition to their
> > object-specific interfaces.  But there are no interfaces listed at all.
> > This seems very strange to me!
> > - If I use the Server object from a program running on the server
machine,
> > then everything is fine.
> > - I registered the IQuery interface on the client machine, just to be
> > sure... still no good.

> > I would really appreciate any input on this, because I'm totally
stumped.

> > -- Matthew Solnit




Sun, 29 Dec 2002 03:00:00 GMT  
 MTS & Custom Interface
Sorry man, this is beyond my knowledge...


Quote:
> The interface is not in MTS.  Let me start from scratch.  Here is my
> problem.  When I add a component to a package in MTS, the MMC tree shows
> nodes for Interfaces and Roles.  I expect to see one or more interfaces in
> the Interfaces list.  But the list is empty.  Why is this happening and
what
> should I do about it?

> -- Matthew Solnit



> > Why do you have your interface in MTS ?

> > if you get it out of the package and register it on the server as a
> regular
> > dll you can reference it from within your components.



> > > Hello everybody.  I'm having a problem using a custom interface with
an
> > > object in MTS.  I have a bunch of Query objects in my MTS package, and
> > they
> > > all implement my IQuery interface, which I defined in a separate TLB.
> In
> > > another package, I have a Server object, which uses the various Query
> > > objects via this IQuery interface.  Finally, on the client machine, I
> have
> > > an object which uses the Server object remotely.

> > > When the client calls the Execute method on the server object, an
error
> is
> > > raised inside the server object:

> > > "Automation error:  Interface not registered."

> > > This error is passed back to the client in a special Recordset object.
> > This
> > > error is frustrating because I don't know how to fix it.  The TLB was
> > > registered on the server machine before I created my MTS packages.

> > > The Server.Execute() method looks like this:

> > > Public Function Execute(ByVal sObjectName As String) As
ADODB.Recordset
> > >     Dim oQuery As MyLibrary.IQuery

> > >     Set oQuery = CreateObject(sObjectName)
> > >     Set Execute = oQuery.Execute()
> > > End Function

> > > Here is some more information, which may help you figure out my
problem:

> > > - I am using Windows NT 4.0, with the Option Pack
> > > - When I add the Server component and the various Query components to
> MTS,
> > > they do not have any interfaces.  I expected to see _Server for the
> Server
> > > object, and IQuery for the Query objects, in addition to their
> > > object-specific interfaces.  But there are no interfaces listed at
all.
> > > This seems very strange to me!
> > > - If I use the Server object from a program running on the server
> machine,
> > > then everything is fine.
> > > - I registered the IQuery interface on the client machine, just to be
> > > sure... still no good.

> > > I would really appreciate any input on this, because I'm totally
> stumped.

> > > -- Matthew Solnit




Sun, 29 Dec 2002 03:00:00 GMT  
 MTS & Custom Interface

Might be something particular about your implementation that's causing the
issue.  You've got a pretty sophisticated setup for your interfaces here, so
it's hard to tell exactly where things are going awry.  You may want to try
creating a simple COM object using no custom interfaces, and see if that
works as expected.  If not, you may have a problem with your MTS
installation.  Then, gradually add pieces until you get to the
implementation you are doing -- first, adding a custom interface, checking
it, and gradually getting to the point where you have several components
sharing an interface, as you do now.  Somewhere along the way, you should
find out what is driving the problem, and then a resolution can be
determined.  Wish I'd run across this before, so I could spare you the debug
work...

Chris


Quote:
> That makes sense.  But I don't know what my problem is on the server
> machine.  OLEView shows everything is there.  But MTS shows no interfaces.

> Has anybody seen anything like this before?  I'm so confused.

> -- Matthew Solnit



> > Hi Matthew,

> > Your problem is that you aren't seeing any interfaces at all when you
> > register your components in MTS.  If you browse to your object with
> OLEView,
> > do you see your interfaces there?

> > This issue spreads down to your client.  I presume your DCOM
> implementation
> > is through an MTS package?  If MTS isn't seeing your interfaces, than
the
> > proxy-stub code it creates won't know of them either.  You need to
resolve
> > it on your server machine.

> > Chris Jackson



> > > Hello everybody.  I'm having a problem using a custom interface with
an
> > > object in MTS.  I have a bunch of Query objects in my MTS package, and
> > they
> > > all implement my IQuery interface, which I defined in a separate TLB.
> In
> > > another package, I have a Server object, which uses the various Query
> > > objects via this IQuery interface.  Finally, on the client machine, I
> have
> > > an object which uses the Server object remotely.

> > > When the client calls the Execute method on the server object, an
error
> is
> > > raised inside the server object:

> > > "Automation error:  Interface not registered."

> > > This error is passed back to the client in a special Recordset object.
> > This
> > > error is frustrating because I don't know how to fix it.  The TLB was
> > > registered on the server machine before I created my MTS packages.

> > > The Server.Execute() method looks like this:

> > > Public Function Execute(ByVal sObjectName As String) As
ADODB.Recordset
> > >     Dim oQuery As MyLibrary.IQuery

> > >     Set oQuery = CreateObject(sObjectName)
> > >     Set Execute = oQuery.Execute()
> > > End Function

> > > Here is some more information, which may help you figure out my
problem:

> > > - I am using Windows NT 4.0, with the Option Pack
> > > - When I add the Server component and the various Query components to
> MTS,
> > > they do not have any interfaces.  I expected to see _Server for the
> Server
> > > object, and IQuery for the Query objects, in addition to their
> > > object-specific interfaces.  But there are no interfaces listed at
all.
> > > This seems very strange to me!
> > > - If I use the Server object from a program running on the server
> machine,
> > > then everything is fine.
> > > - I registered the IQuery interface on the client machine, just to be
> > > sure... still no good.

> > > I would really appreciate any input on this, because I'm totally
> stumped.

> > > -- Matthew Solnit




Mon, 30 Dec 2002 03:00:00 GMT  
 MTS & Custom Interface

I figured out what it was (and immediately smacked myself).  I was adding
the components incorrectly.  When I used "Install Components that are
already Registered" the interfaces were not added.  When I used "Import New
Components" and chose the DLL files, everything was fine.

Why does it work that way?


Quote:
> Might be something particular about your implementation that's causing the
> issue.  You've got a pretty sophisticated setup for your interfaces here,
so
> it's hard to tell exactly where things are going awry.  You may want to
try
> creating a simple COM object using no custom interfaces, and see if that
> works as expected.  If not, you may have a problem with your MTS
> installation.  Then, gradually add pieces until you get to the
> implementation you are doing -- first, adding a custom interface, checking
> it, and gradually getting to the point where you have several components
> sharing an interface, as you do now.  Somewhere along the way, you should
> find out what is driving the problem, and then a resolution can be
> determined.  Wish I'd run across this before, so I could spare you the
debug
> work...

> Chris



> > That makes sense.  But I don't know what my problem is on the server
> > machine.  OLEView shows everything is there.  But MTS shows no
interfaces.

> > Has anybody seen anything like this before?  I'm so confused.

> > -- Matthew Solnit



> > > Hi Matthew,

> > > Your problem is that you aren't seeing any interfaces at all when you
> > > register your components in MTS.  If you browse to your object with
> > OLEView,
> > > do you see your interfaces there?

> > > This issue spreads down to your client.  I presume your DCOM
> > implementation
> > > is through an MTS package?  If MTS isn't seeing your interfaces, than
> the
> > > proxy-stub code it creates won't know of them either.  You need to
> resolve
> > > it on your server machine.

> > > Chris Jackson



> > > > Hello everybody.  I'm having a problem using a custom interface with
> an
> > > > object in MTS.  I have a bunch of Query objects in my MTS package,
and
> > > they
> > > > all implement my IQuery interface, which I defined in a separate
TLB.
> > In
> > > > another package, I have a Server object, which uses the various
Query
> > > > objects via this IQuery interface.  Finally, on the client machine,
I
> > have
> > > > an object which uses the Server object remotely.

> > > > When the client calls the Execute method on the server object, an
> error
> > is
> > > > raised inside the server object:

> > > > "Automation error:  Interface not registered."

> > > > This error is passed back to the client in a special Recordset
object.
> > > This
> > > > error is frustrating because I don't know how to fix it.  The TLB
was
> > > > registered on the server machine before I created my MTS packages.

> > > > The Server.Execute() method looks like this:

> > > > Public Function Execute(ByVal sObjectName As String) As
> ADODB.Recordset
> > > >     Dim oQuery As MyLibrary.IQuery

> > > >     Set oQuery = CreateObject(sObjectName)
> > > >     Set Execute = oQuery.Execute()
> > > > End Function

> > > > Here is some more information, which may help you figure out my
> problem:

> > > > - I am using Windows NT 4.0, with the Option Pack
> > > > - When I add the Server component and the various Query components
to
> > MTS,
> > > > they do not have any interfaces.  I expected to see _Server for the
> > Server
> > > > object, and IQuery for the Query objects, in addition to their
> > > > object-specific interfaces.  But there are no interfaces listed at
> all.
> > > > This seems very strange to me!
> > > > - If I use the Server object from a program running on the server
> > machine,
> > > > then everything is fine.
> > > > - I registered the IQuery interface on the client machine, just to
be
> > > > sure... still no good.

> > > > I would really appreciate any input on this, because I'm totally
> > stumped.

> > > > -- Matthew Solnit




Tue, 31 Dec 2002 03:00:00 GMT  
 MTS & Custom Interface
Glad you got it fixed.  I've always just installed as "Import New
Components," so I haven't run into the issue with installing components that
are already registered.  Strange...

Chris


Quote:
> I figured out what it was (and immediately smacked myself).  I was adding
> the components incorrectly.  When I used "Install Components that are
> already Registered" the interfaces were not added.  When I used "Import
New
> Components" and chose the DLL files, everything was fine.

> Why does it work that way?



> > Might be something particular about your implementation that's causing
the
> > issue.  You've got a pretty sophisticated setup for your interfaces
here,
> so
> > it's hard to tell exactly where things are going awry.  You may want to
> try
> > creating a simple COM object using no custom interfaces, and see if that
> > works as expected.  If not, you may have a problem with your MTS
> > installation.  Then, gradually add pieces until you get to the
> > implementation you are doing -- first, adding a custom interface,
checking
> > it, and gradually getting to the point where you have several components
> > sharing an interface, as you do now.  Somewhere along the way, you
should
> > find out what is driving the problem, and then a resolution can be
> > determined.  Wish I'd run across this before, so I could spare you the
> debug
> > work...

> > Chris



> > > That makes sense.  But I don't know what my problem is on the server
> > > machine.  OLEView shows everything is there.  But MTS shows no
> interfaces.

> > > Has anybody seen anything like this before?  I'm so confused.

> > > -- Matthew Solnit



> > > > Hi Matthew,

> > > > Your problem is that you aren't seeing any interfaces at all when
you
> > > > register your components in MTS.  If you browse to your object with
> > > OLEView,
> > > > do you see your interfaces there?

> > > > This issue spreads down to your client.  I presume your DCOM
> > > implementation
> > > > is through an MTS package?  If MTS isn't seeing your interfaces,
than
> > the
> > > > proxy-stub code it creates won't know of them either.  You need to
> > resolve
> > > > it on your server machine.

> > > > Chris Jackson



> > > > > Hello everybody.  I'm having a problem using a custom interface
with
> > an
> > > > > object in MTS.  I have a bunch of Query objects in my MTS package,
> and
> > > > they
> > > > > all implement my IQuery interface, which I defined in a separate
> TLB.
> > > In
> > > > > another package, I have a Server object, which uses the various
> Query
> > > > > objects via this IQuery interface.  Finally, on the client
machine,
> I
> > > have
> > > > > an object which uses the Server object remotely.

> > > > > When the client calls the Execute method on the server object, an
> > error
> > > is
> > > > > raised inside the server object:

> > > > > "Automation error:  Interface not registered."

> > > > > This error is passed back to the client in a special Recordset
> object.
> > > > This
> > > > > error is frustrating because I don't know how to fix it.  The TLB
> was
> > > > > registered on the server machine before I created my MTS packages.

> > > > > The Server.Execute() method looks like this:

> > > > > Public Function Execute(ByVal sObjectName As String) As
> > ADODB.Recordset
> > > > >     Dim oQuery As MyLibrary.IQuery

> > > > >     Set oQuery = CreateObject(sObjectName)
> > > > >     Set Execute = oQuery.Execute()
> > > > > End Function

> > > > > Here is some more information, which may help you figure out my
> > problem:

> > > > > - I am using Windows NT 4.0, with the Option Pack
> > > > > - When I add the Server component and the various Query components
> to
> > > MTS,
> > > > > they do not have any interfaces.  I expected to see _Server for
the
> > > Server
> > > > > object, and IQuery for the Query objects, in addition to their
> > > > > object-specific interfaces.  But there are no interfaces listed at
> > all.
> > > > > This seems very strange to me!
> > > > > - If I use the Server object from a program running on the server
> > > machine,
> > > > > then everything is fine.
> > > > > - I registered the IQuery interface on the client machine, just to
> be
> > > > > sure... still no good.

> > > > > I would really appreciate any input on this, because I'm totally
> > > stumped.

> > > > > -- Matthew Solnit




Tue, 31 Dec 2002 03:00:00 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. NEWBIE: Interface of MTS Component - How do I generate an the Interface Information

2. Quering an interface from another using MTS and ASP

3. VB MTS Components loosing Interfaces

4. Samples for MTS, multi-interface, COM samples with security

5. Automation error 2147164145 (8004e00f) while deploying and running interface classes on MTS

6. MTS COM using Interfaces

7. URGENT !!! Interfaces and objects whith MTS

8. URGENT !!! Interfaces and objects whith MTS

9. Want Client to Dim an Interface on the MTS server

10. MTS and Interfaces explanation needed

11. HELP: Generating Interface Information for MTS

12. SOMEWHAT SILLY QUESTION: a Custom COM object, hosted by MTS, exposing an event

 

 
Powered by phpBB® Forum Software