PDA

Click to See Complete Forum and Search --> : DCOM Server application launching


Simon Caiger
Nov 6th, 2003, 07:32 AM
I am quite new to COM and even newer to DCOM (this is my first attempt at using DCOM with my own apps).
So, my apologies if this is a daft question, but here goes anyway.

I have written an AxtiveX.exe which is basically a data server.
I have this installed on what I call my server PC.
If I run a client application on the same server PC, it connects to the server app OK.
If I run the client app on another networked PC, the only way I can get the client app to connect is if I have a second instance of the client app already running on the server PC or if I have the ActiveX application running from the VB IDE.

I have had a look at the Task Manager and notice that whenever I manage to get the client app to connect, the ActiveX.exe is actually running as an application.
If I try to attach the remote client without an instance of it running on the server, I notice that I only get the ActiveX running as a process.

I am pretty sure that the dcomcnfg settings are OK. The only setting I am not sure about is the "Identity" tab setting. I have got "The Launching User" selected as the account to use to run the application.

Operating system is Win2k on both machines.

Am I pissing in the wind to expect to get the client to run the application?

Any one out there who can help?

f0rcegr0wn
Nov 7th, 2003, 05:49 PM
Basically your server is doing what it supposed to do.

When you create a reference to it remotely the server instance will run under that user's domain and as such will not be able to interact with the interface (that is true even if you created it with the same user).

There is no 'easy' way of launching an app remotely and it showing on the interface. I have seen ways of doing this but I think it doesn't address the subject of talking to a COM server but simply launching apps (no communication with them)

If you want to have an interface to your running COM Server you will need to look into creating a GlobalSingleUse class that is launched by another COM class that you have configured to run in the same domain (in your case Interactive user).

Simon Caiger
Nov 10th, 2003, 02:59 AM
Thanks for the reply :)

Still showing my ignorance here but keen to learn.
How can I make my server application automatically start when the server PC is started?

I have worked on a couple of OPC projects and the OPC server (from whichever vendor) somehow gets installed as a Service on the server PC which you can then set to automatically start when the server PC boots.
The server is then available for remote clients.

Any further help would be appreciated.

f0rcegr0wn
Nov 10th, 2003, 03:45 AM
If you look around in the MSDN you will find there is a proggie to make your VB EXEs run as service.

Although this creates the service (and you proggy can start as soon as windows starts) , it does not provide you the interface to communicate like a normal service (don't ask me precisely what that is).

Alternatively you can always add it in you Run registery entry to get it starting when the user logs in.

Simon Caiger
Nov 10th, 2003, 03:46 AM
Thanks for the suggestions.

I'll give it a try.