Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DCOM: CoCreateInstanceEx returns E_ACCESSDENIED

Tags:

I'm working on a DCOM application with the server and client on two machines, both of which are running WinXP with Service Pack 2. On both machines, I'm logged in with the same username and password.

When the client on one machine calls CoCreateInstanceEx, asking the other machine to start up the server application, it returns E_ACCESSDENIED.

I tried going into the server app's component properties in dcomcnfg and giving full permisions to everyone for everything, but that didn't help.

What do I need to do to allow this call to succeed?

Update: When the server app is running on a Windows 2000 box, I do not get this error; CoCreateInstanceEx returns S_OK.

like image 569
Isaac Moses Avatar asked Aug 21 '08 19:08

Isaac Moses


2 Answers

Right, so if your Authentication level is set to Default. What is the authentication level set to in the Default Settings? Just out of interest. (although the fact that it works to a 2000 box probably makes that redundant)

EDIT:

Also: I seem to remember doing a lot of rebooting when I used to play/work with DCOM so maybe a quick reboot of both machines when you're happy with the dcomcnfg settings wouldn't go amis either.

like image 96
Shaun Austin Avatar answered Sep 23 '22 15:09

Shaun Austin


If the PCs aren't both members of the same domain, you need to also given launch & access permissions to "ANONYMOUS LOGON". "Everyone" does not include this.

like image 37
Taneli Waltari Avatar answered Sep 23 '22 15:09

Taneli Waltari