<p>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.</p>

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

<p>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.</p>

<p>What do I need to do to allow this call to succeed?</p>

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

[{'answer_id': 20907, 'author': 'Shaun Austin', 'author_id': 1120, 'author_profile': 'https://Stackoverflow.com/users/1120', 'pm_score': 1, 'selected': False, 'text': '<p>Three things to check:</p>\n\n<p>1) Go back to dcomcnfg and make try making sure that not just the access security but also the "launch permissions" section contains the appropriate security users or groups.</p>\n\n<p>2) Ensure that the Authentication Level is set to something else other than "None"</p>\n\n<p>3) Also check that the location on disk that the component is located is actually accessible to the account configured in the security permissions you set.</p>\n\n<p>EDIT:</p>\n\n<p>One more: Are you calling CoInitialiseSecurity() first too? That rings a bell!</p>\n\n<p>EDIT2:</p>\n\n<p>Based on your update: Try dropping the firewalls completely on both XP machines and see if that makes a difference. You may need to let DCOM through explicitly.</p>\n'}, {'answer_id': 20930, 'author': 'Shaun Austin', 'author_id': 1120, 'author_profile': 'https://Stackoverflow.com/users/1120', 'pm_score': 2, 'selected': False, 'text': "<p>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)</p>\n\n<p>EDIT:</p>\n\n<p>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.</p>\n"}, {'answer_id': 444776, 'author': 'Eli', 'author_id': 9169, 'author_profile': 'https://Stackoverflow.com/users/9169', 'pm_score': 0, 'selected': False, 'text': '<p>What is the flavor of your Windows 2000 box, btw? Professional, Server, Adv Server...</p>\n\n<p>Also, is there a difference between domain membership between the two (one on a domain, the other not, different domains, etc...?)</p>\n\n<p>One more thing - DCOM errors will appear in the System event log at times - especially for object creation - did you check there for clues?</p>\n'}, {'answer_id': 2177875, 'author': 'Rubinsh', 'author_id': 203292, 'author_profile': 'https://Stackoverflow.com/users/203292', 'pm_score': 0, 'selected': False, 'text': '<p>I had the exact same problem.\nThe problem happens in machines that have XP SP2+ OS or newer.</p>\n\n<p>I solved it using the following steps:</p>\n\n<ol>\n<li><p>Verify that both client and server computers are on the same domain.</p></li>\n<li><p>You need to use the same user in both computers, or, if you want to use different users in client and server you need to make sure that both client and server users have privliges on both computers (in particular - make sure that they are members of Distributed COM users group.</p></li>\n<li><p>open Componenet services MMC (run dcomcnfg). </p></li>\n<li><p>Go to My Computer->Properties->Default Properties and make sure that Default Impersenation Level is "Identify"</p></li>\n<li><p>Go to COM Security tab, in both in Access permissions and Launch and activation permissions go to Edit Limits, and add Local and Remote access permissions to the client and server users of your COM application</p></li>\n<li><p>Make sure that you have a firewall exception in port 135 for your application...</p></li>\n</ol>\n\n<p>I hope this helps you!</p>\n'}, {'answer_id': 2855283, 'author': 'Taneli Waltari', 'author_id': 36478, 'author_profile': 'https://Stackoverflow.com/users/36478', 'pm_score': 2, 'selected': False, 'text': '<p>If the PCs aren\'t both members of the same domain, you need to also given launch &amp; access permissions to "ANONYMOUS LOGON". "Everyone" does not include this.</p>\n'}]
['https://Stackoverflow.com/questions/20841', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/179/']