| Previous | Next |
| CO_E_EXCEEDSYSACLLIMIT | CO_E_INCOMPATIBLESTREAMVERSION |
CO_E_ACESINWRONGORDER
ACL access-denied and access-allowed entries are in the wrong order
CO_E_ACESINWRONGORDER is HRESULT 2147549498 (0x8001013A) from winerror.h. The documented description is “Not all the DENY_ACCESS ACEs are arranged in front of the GRANT_ACCESS ACEs in the stream.” The relevant context is the COM IAccessControl, DCOM client identity, trustee translation, token inspection, security descriptor, ACL, or serialization workflow.
What to verify
Verify that ACE type, inheritance, object-specific scope, trustee, and original order are preserved for safe canonicalization. That boundary prevents this result from being misclassified as corruption, network failure, or a reason for an unsafe automatic retry.
Where it is encountered
- IAccessControl initialization, access checks, owner/trustee processing, and serialized ACL persistence.
- Server-side DCOM impersonation, client blanket inspection, token and SID lookup.
- Security descriptor construction, DACL canonicalization, file-backed policy storage, or legacy NetAccess migration.
The immediate focus is a serialized or constructed DACL that is not in canonical order, especially deny ACEs placed after grants they should override.
Correct handling and recovery
Rebuild the ACL using security APIs that produce canonical order, then verify effective access for representative tokens before applying it.
Difference from nearby HRESULTs
It is ordering; CO_E_DECODEFAILED means the ACL stream cannot be decoded reliably at all.
The distinction around it should be represented explicitly in control flow and operational dashboards.
Developer and administrator guidance
After it, avoid broad permission grants or system-wide resets unless code-specific evidence proves a global configuration problem.
Practical scenario
A policy editor appends a deny ACE after an existing allow ACE for the same user. Canonical rebuild moves explicit denies first and regression tests confirm denial.
References
Looking for a different code? Search another status or error code.