| Previous | Next |
| MQ_ERROR_ILLEGAL_CONTEXT | MQ_ERROR_LABEL_TOO_LONG |
MQ_ERROR_ILLEGAL_SORT_PROPID
Operational meaning
When MQ_ERROR_ILLEGAL_SORT_PROPID appears, start with the queue operation and its property arrays rather than with a broad repair of the Message Queuing service. Its diagnostic boundary is sort property is not eligible. The requested column cannot be used as an AD DS sort key even if it can be returned or filtered.
MQLocateBegin searches public queues registered in the directory; it does not enumerate arbitrary private queues. When diagnosing this result, its restriction, projection, and sort structures are translated into a directory-backed query.
When diagnosing this result, the locator observes a directory snapshot beginning when MQLocateBegin is called., newly replicated objects and properties unsupported as columns or sort keys can produce results that differ from direct queue access.
Where to draw the boundary
| Subsystem | MQLocateBegin directory queries over public-queue metadata |
|---|---|
| Decisive boundary | query restrictions, selected columns, and sort keys must be valid for the AD DS-backed locator |
| Code-specific focus | sort property is not eligible |
| Primary recovery rule | Sort by a supported property or order results after retrieval. |
When diagnosing this result, separate a malformed query structure from an AD DS availability error., repeating the same invalid MQSORTSET or MQRESTRICTION against another domain controller will not repair it. The code-specific boundary is sort property is not eligible.
Evidence to preserve
- The ad ds mode and domain identity of the caller; associate it explicitly with this result.
- When diagnosing it, the exact property used for filtering, projection, or ordering; capture the value before cleanup or retry changes it.
- In the path, mqrestriction, mqcolumns, and mqsortset as submitted; compare it with a known-good call using the same account and queue type.
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, it, and the native API or COM method before a framework replaces it with a generic exception.
- Capture MQRESTRICTION, MQCOLUMNS, and MQSORTSET as submitted.
- verify the postcondition after the failed call: queue existence, message presence, directory object state, transaction outcome, or generated output may differ by result.
- capture the exact property used for filtering, projection, or ordering.
- When diagnosing it, apply the code-specific recovery rule: Sort by a supported property or order results after retrieval.
Handling and recovery
Sort by a supported property or order results after retrieval.
When diagnosing it, an immediate loop around the same call is not recovery., define who owns cancellation, handle recreation, transaction reconciliation, and duplicate suppression before another attempt is issued.
Nearby failure boundaries
A directory query shape error is deterministic. switching domain controllers cannot make an unsupported column, relation, or sort key valid. The specific focus for it remains sort property is not eligible.
- In the path, restarting MSMQ before collecting evidence can invalidate handles and erase the first useful event; it is a containment action, not a root-cause diagnosis.
- granting broad queue or certificate permissions may mask the symptom while creating a security defect. Test the exact identity and access needed by the operation.
Worked example
A migration inventory tool encounters it. It captures the restriction/column/sort structures and validates the query before testing directory availability.
Include a negative test for the nearest misleading diagnosis so monitoring and user guidance do not collapse distinct MSMQ failures into one alert.
References
- Microsoft Open Specifications: MSMQ and directory services — source used for the result analysis.
- IETF RFC 4511: LDAP protocol — source used for the result analysis.
- Microsoft: Message Queuing error and information codes — source used for the result analysis.
- Microsoft: MQLocateBegin — source used for the result analysis.
Looking for a different code? Search another status or error code.