| Previous | Next |
| MQ_ERROR_COULD_NOT_GET_ACCOUNT_INFO | MQ_ERROR_ILLEGAL_PROPID |
MQ_ERROR_ILLEGAL_MQCOLUMNS
What this result actually narrows down
The important part of MQ_ERROR_ILLEGAL_MQCOLUMNS is not only whether the call failed, but which MSMQ subsystem had enough information to return this specific result. Its diagnostic boundary is invalid projection structure for a locate query. pColumns must identify a valid MQCOLUMNS structure and supported queue properties.
For MQ_ERROR_ILLEGAL_MQCOLUMNS, public-queue discovery depends on both valid MSMQ query structures and AD DS behavior. When diagnosing MQ_ERROR_ILLEGAL_MQCOLUMNS, A malformed MQSORTSET should be separated from LDAP bind, schema, replication, or permissions failures.
When diagnosing MQ_ERROR_ILLEGAL_MQCOLUMNS, MQLocateBegin searches public queues registered in the directory; it does not enumerate arbitrary private queues. In the MQ_ERROR_ILLEGAL_MQCOLUMNS path, its restriction, projection, and sort structures are translated into a directory-backed query.
MSMQ objects involved
| 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 | invalid projection structure for a locate query |
| Primary recovery rule | Build the projection independently and request only columns that MQLocateBegin can return. |
When diagnosing MQ_ERROR_ILLEGAL_MQCOLUMNS, separate a malformed query structure from an AD DS availability error. In the MQ_ERROR_ILLEGAL_MQCOLUMNS path, repeating the same invalid MQSORTSET or MQRESTRICTION against another domain controller will not repair it. For MQ_ERROR_ILLEGAL_MQCOLUMNS, the code-specific boundary is invalid projection structure for a locate query.
Triage data
- The ad ds mode and domain identity of the caller; associate it explicitly with
MQ_ERROR_ILLEGAL_MQCOLUMNS. - When diagnosing
MQ_ERROR_ILLEGAL_MQCOLUMNS, the exact property used for filtering, projection, or ordering; capture the value before cleanup or retry changes it. - In the
MQ_ERROR_ILLEGAL_MQCOLUMNSpath, mqrestriction, mqcolumns, and mqsortset as submitted; compare it with a known-good call using the same account and queue type. - For this
MQ_ERROR_ILLEGAL_MQCOLUMNSresult, 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_MQCOLUMNS, 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.
A safe investigation order
- Record the unsigned HRESULT,
MQ_ERROR_ILLEGAL_MQCOLUMNS, 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_ILLEGAL_MQCOLUMNS; change one precondition at a time. - In the
MQ_ERROR_ILLEGAL_MQCOLUMNSpath, 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_ILLEGAL_MQCOLUMNSresult, capture the exact property used for filtering, projection, or ordering. - Capture MQRESTRICTION, MQCOLUMNS, and MQSORTSET as submitted.
- When diagnosing
MQ_ERROR_ILLEGAL_MQCOLUMNS, apply the code-specific recovery rule: Build the projection independently and request only columns that MQLocateBegin can return.
Correct response
Build the projection independently and request only columns that MQLocateBegin can return.
When diagnosing MQ_ERROR_ILLEGAL_MQCOLUMNS, 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_ILLEGAL_MQCOLUMNS path, bound attempts and keep an idempotency key for sends or directory mutations.
What this code is not
A directory query shape error is deterministic. For this MQ_ERROR_ILLEGAL_MQCOLUMNS result, switching domain controllers cannot make an unsupported column, relation, or sort key valid. The specific focus for MQ_ERROR_ILLEGAL_MQCOLUMNS remains invalid projection structure for a locate query.
- In the
MQ_ERROR_ILLEGAL_MQCOLUMNSpath, granting broad queue or certificate permissions may mask the symptom while creating a security defect. For thisMQ_ERROR_ILLEGAL_MQCOLUMNSresult, test the exact identity and access needed by the operation. - For this
MQ_ERROR_ILLEGAL_MQCOLUMNSresult, changing queue names, deleting directory objects, or recreating certificates without reconciliation can create a second object while callers still reference the first.
Example failure path
An administration console encounters MQ_ERROR_ILLEGAL_MQCOLUMNS. For MQ_ERROR_ILLEGAL_MQCOLUMNS, it captures the restriction/column/sort structures and validates the query before testing directory availability. When diagnosing MQ_ERROR_ILLEGAL_MQCOLUMNS, the acceptance test then changes only the decisive precondition and confirms both the HRESULT and the actual queue/message state.
A regression test should force MQ_ERROR_ILLEGAL_MQCOLUMNS, assert the raw value and relevant outputs, then correct only the documented precondition and verify the intended success or neighboring HRESULT.
Technical references
- Microsoft Open Specifications: MSMQ and directory services — source used for the
MQ_ERROR_ILLEGAL_MQCOLUMNSanalysis. - IETF RFC 4511: LDAP protocol — source used for the
MQ_ERROR_ILLEGAL_MQCOLUMNSanalysis. - Microsoft: Message Queuing error and information codes — source used for the
MQ_ERROR_ILLEGAL_MQCOLUMNSanalysis. - Microsoft: MQLocateBegin — source used for the
MQ_ERROR_ILLEGAL_MQCOLUMNSanalysis.
Looking for a different code? Search another status or error code.