| Previous | Next |
| MQ_ERROR_ILLEGAL_PROPERTY_SIZE | MQ_ERROR_ILLEGAL_MQQUEUEPROPS |
MQ_ERROR_ILLEGAL_RESTRICTION_PROPID
Why the exact HRESULT matters
The important part of MQ_ERROR_ILLEGAL_RESTRICTION_PROPID is not only whether the call failed, but which MSMQ subsystem had enough information to return this specific result. Its diagnostic boundary is property cannot be used in the locate restriction. A queue property may exist but still be ineligible as an AD DS query predicate.
For MQ_ERROR_ILLEGAL_RESTRICTION_PROPID, MQLocateBegin searches public queues registered in the directory; it does not enumerate arbitrary private queues. When diagnosing MQ_ERROR_ILLEGAL_RESTRICTION_PROPID, its restriction, projection, and sort structures are translated into a directory-backed query.
When diagnosing MQ_ERROR_ILLEGAL_RESTRICTION_PROPID, public-queue discovery depends on both valid MSMQ query structures and AD DS behavior. In the MQ_ERROR_ILLEGAL_RESTRICTION_PROPID path, A malformed MQSORTSET should be separated from LDAP bind, schema, replication, or permissions failures.
Subsystem context
| 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 | property cannot be used in the locate restriction |
| Primary recovery rule | Choose a documented searchable property or filter the returned rows in the application. |
When diagnosing MQ_ERROR_ILLEGAL_RESTRICTION_PROPID, separate a malformed query structure from an AD DS availability error. In the MQ_ERROR_ILLEGAL_RESTRICTION_PROPID path, repeating the same invalid MQSORTSET or MQRESTRICTION against another domain controller will not repair it. For MQ_ERROR_ILLEGAL_RESTRICTION_PROPID, the code-specific boundary is property cannot be used in the locate restriction.
Minimum useful telemetry
- The exact property used for filtering, projection, or ordering; associate it explicitly with
MQ_ERROR_ILLEGAL_RESTRICTION_PROPID. - When diagnosing
MQ_ERROR_ILLEGAL_RESTRICTION_PROPID, mqrestriction, mqcolumns, and mqsortset as submitted; capture the value before cleanup or retry changes it. - In the
MQ_ERROR_ILLEGAL_RESTRICTION_PROPIDpath, the ad ds mode and domain identity of the caller; compare it with a known-good call using the same account and queue type. - For this
MQ_ERROR_ILLEGAL_RESTRICTION_PROPIDresult, 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_ILLEGAL_RESTRICTION_PROPID, 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.
Step-by-step diagnosis
- Record the unsigned HRESULT,
MQ_ERROR_ILLEGAL_RESTRICTION_PROPID, and the native API or COM method before a framework replaces it with a generic exception. - When diagnosing
MQ_ERROR_ILLEGAL_RESTRICTION_PROPID, capture the exact property used for filtering, projection, or ordering. - Reproduce with the smallest queue/message/property set that still returns
MQ_ERROR_ILLEGAL_RESTRICTION_PROPID; change one precondition at a time. - For this
MQ_ERROR_ILLEGAL_RESTRICTION_PROPIDresult, verify the postcondition after the failed call: queue existence, message presence, directory object state, transaction outcome, or generated output may differ by result. - For
MQ_ERROR_ILLEGAL_RESTRICTION_PROPID, capture the AD DS mode and domain identity of the caller. - When diagnosing
MQ_ERROR_ILLEGAL_RESTRICTION_PROPID, apply the code-specific recovery rule: Choose a documented searchable property or filter the returned rows in the application.
Retry and cleanup
Choose a documented searchable property or filter the returned rows in the application.
When diagnosing MQ_ERROR_ILLEGAL_RESTRICTION_PROPID, do not hide this HRESULT behind an unlimited framework retry. In the MQ_ERROR_ILLEGAL_RESTRICTION_PROPID path, require a verified precondition change and preserve the original correlation identifier across the next attempt.
Avoiding a false diagnosis
A directory query shape error is deterministic. For this MQ_ERROR_ILLEGAL_RESTRICTION_PROPID result, switching domain controllers cannot make an unsupported column, relation, or sort key valid. The specific focus for MQ_ERROR_ILLEGAL_RESTRICTION_PROPID remains property cannot be used in the locate restriction.
- In the
MQ_ERROR_ILLEGAL_RESTRICTION_PROPIDpath, A successful test under an interactive administrator account does not prove that the production service account has the same profile, token, directory access, or key permissions. - For this
MQ_ERROR_ILLEGAL_RESTRICTION_PROPIDresult, restarting MSMQ before collecting evidence can invalidate handles and erase the first useful event; it is a containment action, not a root-cause diagnosis.
Example
An administration console encounters MQ_ERROR_ILLEGAL_RESTRICTION_PROPID. For MQ_ERROR_ILLEGAL_RESTRICTION_PROPID, it captures the restriction/column/sort structures and validates the query before testing directory availability. When diagnosing MQ_ERROR_ILLEGAL_RESTRICTION_PROPID, 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_ILLEGAL_RESTRICTION_PROPID, and test that a retry does not duplicate messages or directory objects.
References
- Microsoft Open Specifications: MSMQ and directory services — source used for the
MQ_ERROR_ILLEGAL_RESTRICTION_PROPIDanalysis. - IETF RFC 4511: LDAP protocol — source used for the
MQ_ERROR_ILLEGAL_RESTRICTION_PROPIDanalysis. - Microsoft: Message Queuing error and information codes — source used for the
MQ_ERROR_ILLEGAL_RESTRICTION_PROPIDanalysis. - Microsoft: MQLocateBegin — source used for the
MQ_ERROR_ILLEGAL_RESTRICTION_PROPIDanalysis.
Looking for a different code? Search another status or error code.