What does HRESULT 0x80005000 (E_ADS_BAD_PATHNAME) mean?

 
Previous Next
CO_E_PREMATURE_STUB_RUNDOWN E_ADS_INVALID_DOMAIN_OBJECT

E_ADS_BAD_PATHNAME

E_ADS_BAD_PATHNAME points to the ADSI binding string itself. For the LDAP provider, the ADsPath has the form LDAP://Host[:Port]/DistinguishedName; provider prefix, host selection, distinguished name components, and escaping all participate in parsing the target object.

Validate the ADsPath before investigating object properties

  • Log the exact ADsPath passed to ADsGetObject, ADsOpenObject, or Automation GetObject.
  • Check the provider prefix and distinguish a serverless LDAP path from one that pins a specific host or port.
  • Escape distinguished-name special characters according to DN rules; do not reuse LDAP filter escaping for an ADsPath.

Microsoft notes that ADsPath combines the provider identifier with the object DN, and the LDAP provider accepts several host/DN forms. RFC 4514 defines the string representation and escaping rules for LDAP distinguished names. If the same DN works with one server but not another, also compare the host name form and authentication requirements rather than rewriting attribute names or search filters—the failure occurs before property access.

LDAP ADsPath format · Binding Active Directory objects · RFC 4514 distinguished names


Looking for a different code? Search another status or error code.