views:

40

answers:

1

I am using a third party database. A host application runs the database, and allows client applications to connect to the server app over COM. I am running Windows 2003 Server, and writing all of my code in C#.

On the server, I login as UserA, and am able to launch the host application locally, and then run a client app that I have written, which connects up just fine.

When I stay logged in as UserA, running the host app, I login simultaneously as UserB over remote desktop, and only launch the client app from User B's login, expecting it to connect to the running host process on User A's desktop. It is unable to connect.

Are there any tricks to making COM access work across user logins on the same computer?

I cannot run more than one copy of the host process, or I would obviously do that.

+1  A: 

Open Component Services (I'm not sure where this is for Server 2003, but probably under administrative tools).

Expand to Component services->My Computer->DCOM Config.

Find the application you're wanting to connect to, right click and go to properties. Under security, you should be able to set launch, activate and access permissions.

You'll need to click the Customize radio button before you can edit the permissions. You'll have to add any users you want to both Launch and Activate, as well as Access.

Matthew Talbert