title: C# COM Interop, try to access remote COM server gets 0x80070005 Error
body: <p>I have a WPFApplication coded in c# to access a COM component. I have added reference to the COM component from my app. When I have both client(my app) and server(com) in same machine it works as expected. 
  The problem is when they are on different machines. Both machines are identical, I mean have Windows 7 OS. And both on same domain. I tried to create an instance of the com component with below code and it gives me no error</p>
  
  <pre><code>IPDSIntf test; 
  string clsId = "85689616-277B-4E00-9A5E-19AD78E7E0E2";
  var type = Type.GetTypeFromCLSID(new Guid(clsId), MachineName, true);
                  var COMObject = Activator.CreateInstance(type);
                  test = (IPDSIntf)COMObject;
  </code></pre>
  
  <p>Now when I call any method in the COM. say <strong>test.Connect(clientId, errorCode)</strong>, I am getting exception 'Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))'.</p>
  
  <p>Have set many permission, gave admin privilege to my user account on the server machine, added my account to 'Distributed COM Users' group etc... But still getting same issue. For all type of users(anonymous, network, everyone...), gave 'local and remote' access in COM security option of the server computer, through DCOMCNFG and all that saw when did google search. Firewall is turned off in both client and server. </p>
  
  <p>Now left with no option to try.I am running out of time to fix it and have already spent 4 days on the same, googling. But no luck.</p>
  
  <p>One more thing, is I could not see my COM in DCOMCNFG, means it is not registered? What could be the reason for it. I believe all COM component in machine will be registered in component services. Need some clarification on this too as I doubt it has some relation with my issue.</p>
  
  <p>Thanks In advance,
  Nishitha</p>