ATL and Services 
Author Message
 ATL and Services

Situation:  A service, an out of proc server (COM .exe) and many client
apps.  How do you get the service to talk to the same instance of the server
as the client apps do?  When noone else is logged on there is no problem,
but there are times when I want to log in and use a client app to connect to
the same server.exe to see what the service is seeing.

Right now the clients instantiate a copy of the server.exe and the service
instatiates it's own copy.

Anyone run into this before and have any hints?

Thanks!

Kevin



Sun, 22 Feb 2004 07:46:31 GMT  
 ATL and Services
It depends on many factors, such as security. Service runs at system
account other than client's account. You can refer to the following article:

INFO: COM Servers Activation and NT Windows Stations
Q169321

HOWTO: Alternative Implementation of ATL Singleton
Q201321

Hope it helps.

yhhuang
ICQ:91074870



Sun, 22 Feb 2004 19:17:51 GMT  
 ATL and Services
In DCOMCnfg/the properties for your server/the Identity tab choose
"This User" and fill in the account details for the NT account your
server is to run under.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD

MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================


Quote:
> Situation:  A service, an out of proc server (COM .exe) and many client
> apps.  How do you get the service to talk to the same instance of the
server
> as the client apps do?  When noone else is logged on there is no problem,
> but there are times when I want to log in and use a client app to connect
to
> the same server.exe to see what the service is seeing.

> Right now the clients instantiate a copy of the server.exe and the service
> instatiates it's own copy.

> Anyone run into this before and have any hints?

> Thanks!

> Kevin



Mon, 23 Feb 2004 02:10:57 GMT  
 ATL and Services
Thank you!


Quote:
> In DCOMCnfg/the properties for your server/the Identity tab choose
> "This User" and fill in the account details for the NT account your
> server is to run under.

> --
> =====================================
> Alexander Nickolov
> Microsoft MVP [VC], MCSD

> MVP VC FAQ: http://www.mvps.org/vcfaq
> =====================================



> > Situation:  A service, an out of proc server (COM .exe) and many client
> > apps.  How do you get the service to talk to the same instance of the
> server
> > as the client apps do?  When noone else is logged on there is no
problem,
> > but there are times when I want to log in and use a client app to
connect
> to
> > the same server.exe to see what the service is seeing.

> > Right now the clients instantiate a copy of the server.exe and the
service
> > instatiates it's own copy.

> > Anyone run into this before and have any hints?

> > Thanks!

> > Kevin



Tue, 24 Feb 2004 08:07:34 GMT  
 ATL and Services
Thanks!  This was very helpful information.


Quote:
> It depends on many factors, such as security. Service runs at system
> account other than client's account. You can refer to the following
article:

> INFO: COM Servers Activation and NT Windows Stations
> Q169321

> HOWTO: Alternative Implementation of ATL Singleton
> Q201321

> Hope it helps.

> yhhuang
> ICQ:91074870



Tue, 24 Feb 2004 08:08:35 GMT  
 ATL and Services
I set the interface that is being used by my service to run as "Interactive
User" and that made the system use the same .exe for both the service and my
client.  Do you know if there's a programatic way to change this setting, so
I can set it when I install my software on other machines?  Also, do you
know if this setting will cause any other problems....some of the stuff I've
read seemed to indicate that it might not work if no interactive user was
logged in....

Thanks,

Kevin


Quote:
> In DCOMCnfg/the properties for your server/the Identity tab choose
> "This User" and fill in the account details for the NT account your
> server is to run under.

> --
> =====================================
> Alexander Nickolov
> Microsoft MVP [VC], MCSD

> MVP VC FAQ: http://www.mvps.org/vcfaq
> =====================================



> > Situation:  A service, an out of proc server (COM .exe) and many client
> > apps.  How do you get the service to talk to the same instance of the
> server
> > as the client apps do?  When noone else is logged on there is no
problem,
> > but there are times when I want to log in and use a client app to
connect
> to
> > the same server.exe to see what the service is seeing.

> > Right now the clients instantiate a copy of the server.exe and the
service
> > instatiates it's own copy.

> > Anyone run into this before and have any hints?

> > Thanks!

> > Kevin



Wed, 25 Feb 2004 01:50:18 GMT  
 ATL and Services
See http://www.iapetus.com/dcom/dcomtool.htm and the DCOMPERM
sample (made into a component) by Michael Nelson.

As for the side effect - yes, Interactive User only works if there's an
"interactive user" :) logged in. Another pitfall is the security context
the server runs under depends on the logged in user... Do not use
this setting for anything other than debugging. Use "This User" as I
already suggested.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD

MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================


Quote:
> I set the interface that is being used by my service to run as
"Interactive
> User" and that made the system use the same .exe for both the service and
my
> client.  Do you know if there's a programatic way to change this setting,
so
> I can set it when I install my software on other machines?  Also, do you
> know if this setting will cause any other problems....some of the stuff
I've
> read seemed to indicate that it might not work if no interactive user was
> logged in....

> Thanks,

> Kevin



> > In DCOMCnfg/the properties for your server/the Identity tab choose
> > "This User" and fill in the account details for the NT account your
> > server is to run under.

> > --
> > =====================================
> > Alexander Nickolov
> > Microsoft MVP [VC], MCSD

> > MVP VC FAQ: http://www.mvps.org/vcfaq
> > =====================================



> > > Situation:  A service, an out of proc server (COM .exe) and many
client
> > > apps.  How do you get the service to talk to the same instance of the
> > server
> > > as the client apps do?  When noone else is logged on there is no
> problem,
> > > but there are times when I want to log in and use a client app to
> connect
> > to
> > > the same server.exe to see what the service is seeing.

> > > Right now the clients instantiate a copy of the server.exe and the
> service
> > > instatiates it's own copy.

> > > Anyone run into this before and have any hints?

> > > Thanks!

> > > Kevin



Wed, 25 Feb 2004 05:53:36 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Cannot start service ATL COM Service

2. ATL Service service could not be deleted message???

3. ATL as Service : Service State Handler

4. ATL Control & ATL Web Service

5. VARIANT and ATL Web Service

6. Atl Attributed Service and MFC

7. HELP - ATL NT Service and COM Interface Problem

8. ERROR Consuming ATL Web Services in C#.Net..

9. Using managed Extensions from ATL Web service

10. Calling ATL Web Service from ASP.NET

11. atl web service interop with apache

12. ERROR Consuming ATL Web Services in C#.Net..

 

 
Powered by phpBB® Forum Software