AD Change Password C#: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))


I was trying to Reset/Change Password for Active Directory through C# code behind. And I encountered with the same error:Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Access Denied errors that are reported by scripts and applications that access WMI namespaces and data generally fall into three categories.

Possible Reasons are:
The user does not have remote access to the computer through DCOM. Typically, DCOM errors occur when connecting to a remote computer with a different operating system versions.

Give the user Remote Launch and Remote Activation permissions in dcomcnfg.

  • Right-click My Computer-> Properties Under COM Security, click “Edit Limits” for both sections.
  • Give the user you want remote access, remote launch, and remote activation.
  • Go to DCOM Config, find “Windows Management Instrumentation”, and give the user you want Remote Launch and Remote Activation.

For more information, see Connecting Between Different Operating Systems



CRM Installation Error: Action Microsoft.Crm.Setup.Common.Analyzer+CollectAction failed.

I was setting up a new virtual machine today for Microsoft Dynamics CRM today and encountered the error:

Action Microsoft.Crm.Setup.Common.Analyzer+CollectAction failed.
The specified domain either does not exist or could not be contacted. (Exception from HRESULT: 0x8007054B)


CRM Installation Error

The error is related to Active Directory. To resolve this issue, you just have to add the current server to the existing domain or promote the server as a domain (in case of virtual machine… similar to my case).