Click to See Complete Forum and Search --> : Why can't my DCOM Server cannot access the registry?


Alvaro
April 9th, 1999, 06:40 PM
Hi,

I have developed an AppWizard-generated ATL COM server which runs as a stand-alone EXE on a remote machine. Clients are supposed to connect to the server and feed it data which it then processes based on some registry settings. The problem is that the server (which is instanciated by DCOM) doesn't have access to the registry settings on the machine its running! I searched through the security-related code generated by AppWizard and found this:

// This provides a NULL DACL which will allow access to everyone.
CSecurityDescriptor sd;
sd.InitializeFromThreadToken();
hr = CoInitializeSecurity(sd, -1, NULL, NULL,
RPC_C_AUTHN_LEVEL_PKT, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE, NULL);
_ASSERTE(SUCCEEDED(hr));

I tried playing around with different parameters but I didn't have success. Can you help?

I also noticed another annoying "feature" of DCOM which I wish I could disable: the fact that the server's process cannot be terminated even from the machine where it's running! Once a client spawns the process remotely, the process lingers around forever and I don't know of a way to kill it. Saying "End Process" on the Task Manager results in an "Access Denied" error. Do you know of a way to kill it?

I really appreciate your help!

Alvaro