| Previous | Next |
| MQ_ERROR_CANNOT_GET_DN | MQ_ERROR_CANNOT_SIGN_DATA_EX |
MQ_ERROR_CANNOT_HASH_DATA_EX
Operational meaning
The important part of MQ_ERROR_CANNOT_HASH_DATA_EX is not only whether the call failed, but which MSMQ subsystem had enough information to return this specific result. Its diagnostic boundary is authenticated message data cannot be hashed. Capture algorithm, provider, input lengths, and underlying cryptographic error before the message is signed.
For MQ_ERROR_CANNOT_HASH_DATA_EX, encryption capability and message authentication are related but distinct. When diagnosing MQ_ERROR_CANNOT_HASH_DATA_EX, preserve provider, algorithm, certificate, key-container, and queue authentication/privacy settings rather than collapsing them into one “SSL” diagnosis.
When diagnosing MQ_ERROR_CANNOT_HASH_DATA_EX, MSMQ security material can live in the current user profile and be registered in directory services. In the MQ_ERROR_CANNOT_HASH_DATA_EX path, services running under another account or without a loaded profile can observe a different certificate-store state.
Where to draw the boundary
| Subsystem | MSMQ message authentication, certificate registration, signing, hashing, and encryption |
|---|---|
| Decisive boundary | certificate identity, key availability, provider capability, and message policy are independent checks |
| Code-specific focus | authenticated message data cannot be hashed |
| Primary recovery rule | Do not regenerate certificates until hash creation and data access are tested. |
When diagnosing MQ_ERROR_CANNOT_HASH_DATA_EX, queue ACLs, certificate trust, private-key access, provider support, and destination authentication policy are independent. Test the layer named by the evidence. For MQ_ERROR_CANNOT_HASH_DATA_EX, the code-specific boundary is authenticated message data cannot be hashed.
Evidence to preserve
- Whether the failure occurred while preparing, sending, storing, or validating the message; associate it explicitly with
MQ_ERROR_CANNOT_HASH_DATA_EX. - When diagnosing
MQ_ERROR_CANNOT_HASH_DATA_EX, certificate store location and security identity used by the process; capture the value before cleanup or retry changes it. - In the
MQ_ERROR_CANNOT_HASH_DATA_EXpath, provider name/type, hash algorithm, and privacy/authentication properties; compare it with a known-good call using the same account and queue type. - For this
MQ_ERROR_CANNOT_HASH_DATA_EXresult, record the queue path or format name, local/remote placement, transactional flag, caller SID, process build, and UTC correlation ID when they apply.
For MQ_ERROR_CANNOT_HASH_DATA_EX, log certificate thumbprints, provider names, SIDs, GUIDs, lengths, and hashes where useful, but do not log private keys, symmetric keys, credentials, or confidential message bodies.
Diagnostic sequence
- Record the unsigned HRESULT,
MQ_ERROR_CANNOT_HASH_DATA_EX, and the native API or COM method before a framework replaces it with a generic exception. - Reproduce with the smallest queue/message/property set that still returns
MQ_ERROR_CANNOT_HASH_DATA_EX; change one precondition at a time. - In the
MQ_ERROR_CANNOT_HASH_DATA_EXpath, verify the postcondition after the failed call: queue existence, message presence, directory object state, transaction outcome, or generated output may differ by result. - For this
MQ_ERROR_CANNOT_HASH_DATA_EXresult, capture provider name/type, hash algorithm, and privacy/authentication properties. - For
MQ_ERROR_CANNOT_HASH_DATA_EX, capture whether the failure occurred while preparing, sending, storing, or validating the message. - When diagnosing
MQ_ERROR_CANNOT_HASH_DATA_EX, apply the code-specific recovery rule: Do not regenerate certificates until hash creation and data access are tested.
Handling and recovery
Do not regenerate certificates until hash creation and data access are tested.
When diagnosing MQ_ERROR_CANNOT_HASH_DATA_EX, retry only after a measurable state change: corrected property data, resized storage, restored service/directory reachability, recreated handle, completed transaction recovery, or repaired certificate access. In the MQ_ERROR_CANNOT_HASH_DATA_EX path, bound attempts and keep an idempotency key for sends or directory mutations.
Nearby failure boundaries
In the MQ_ERROR_CANNOT_HASH_DATA_EX path, authentication failure is not synonymous with queue access denial. For this MQ_ERROR_CANNOT_HASH_DATA_EX result, certificate stores, private keys, providers, signatures, and queue policy must be tested separately. The specific focus for MQ_ERROR_CANNOT_HASH_DATA_EX remains authenticated message data cannot be hashed.
- In the
MQ_ERROR_CANNOT_HASH_DATA_EXpath, restarting MSMQ before collecting evidence can invalidate handles and erase the first useful event; it is a containment action, not a root-cause diagnosis. - For this
MQ_ERROR_CANNOT_HASH_DATA_EXresult, granting broad queue or certificate permissions may mask the symptom while creating a security defect. ForMQ_ERROR_CANNOT_HASH_DATA_EX, test the exact identity and access needed by the operation.
Worked example
A secure connector encounters MQ_ERROR_CANNOT_HASH_DATA_EX. For MQ_ERROR_CANNOT_HASH_DATA_EX, it tests store and private-key access under the production identity before changing queue security. When diagnosing MQ_ERROR_CANNOT_HASH_DATA_EX, the acceptance test then changes only the decisive precondition and confirms both the HRESULT and the actual queue/message state.
Automated coverage should preserve the original arrays/identities, confirm that cleanup is safe after MQ_ERROR_CANNOT_HASH_DATA_EX, and test that a retry does not duplicate messages or directory objects.
Hash-stage evidence
For MQ_ERROR_CANNOT_HASH_DATA_EX, separate acquisition of a cryptographic provider from creation of a hash object and from feeding message bytes into that object. Record the provider type, hash algorithm property, byte counts for authenticated message fields, and the native CryptoAPI error immediately following the MSMQ call. A certificate can be present and its private key can be readable while the selected provider still refuses the requested hash algorithm or input operation.
- Confirm that the message property arrays remain valid for the entire native call and that lengths are expressed in the units required by each property.
- Compare a minimal authenticated message with the production message to isolate a particular extension, connector field, or serialized body segment.
- Do not publish or log the message body merely to diagnose hashing; a cryptographic digest and lengths normally provide safer correlation.
References
- Microsoft: authenticated MSMQ message with an external certificate — source used for the
MQ_ERROR_CANNOT_HASH_DATA_EXanalysis. - Microsoft: MSMQMessage object and message properties — source used for the
MQ_ERROR_CANNOT_HASH_DATA_EXanalysis. - Microsoft: Windows certificate stores — source used for the
MQ_ERROR_CANNOT_HASH_DATA_EXanalysis. - IETF RFC 5280: Internet X.509 PKI certificate profile — source used for the
MQ_ERROR_CANNOT_HASH_DATA_EXanalysis. - Microsoft: Message Queuing error and information codes — source used for the
MQ_ERROR_CANNOT_HASH_DATA_EXanalysis.
Looking for a different code? Search another status or error code.