| Previous | Next |
| MQ_ERROR_ILLEGAL_QUEUE_PATHNAME | MQ_ERROR_ILLEGAL_PROPERTY_VT |
MQ_ERROR_ILLEGAL_PROPERTY_VALUE
Operational meaning
MQ_ERROR_ILLEGAL_PROPERTY_VALUE belongs to the Message Queuing HRESULT facility, but its useful meaning is narrower than a generic messaging failure. Its diagnostic boundary is valid property with an invalid value. The identifier and VARTYPE can be correct while the numeric range, string syntax, flag combination, or enum value is not.
For MQ_ERROR_ILLEGAL_PROPERTY_VALUE, validation occurs in layers: identifier recognition, variant type, buffer shape, value range, required companions, and operation eligibility. When diagnosing MQ_ERROR_ILLEGAL_PROPERTY_VALUE, these layers correspond to different MSMQ HRESULTs and different fixes.
When diagnosing MQ_ERROR_ILLEGAL_PROPERTY_VALUE, MSMQ uses arrays whose indexes bind a property identifier, an MQPROPVARIANT value, and optionally a status result. In the MQ_ERROR_ILLEGAL_PROPERTY_VALUE path, misaligned counts or reordered arrays can make the logged property differ from the one actually rejected.
Where to draw the boundary
| Subsystem | MSMQ property arrays and their parallel identifier, value, and status elements |
|---|---|
| Decisive boundary | the property identifier, VARTYPE, value, operation, and buffer ownership are validated separately |
| Code-specific focus | valid property with an invalid value |
| Primary recovery rule | Validate against the documentation for that exact property, not against a similarly named property. |
When diagnosing MQ_ERROR_ILLEGAL_PROPERTY_VALUE, do not merge this result with other property failures: identifier, VARTYPE, value, size, required companions, and operation eligibility are diagnosed by different codes. For MQ_ERROR_ILLEGAL_PROPERTY_VALUE, the code-specific boundary is valid property with an invalid value.
Evidence to preserve
- The complete apropid/apropvar/astatus triples in original order; associate it explicitly with
MQ_ERROR_ILLEGAL_PROPERTY_VALUE. - When diagnosing
MQ_ERROR_ILLEGAL_PROPERTY_VALUE, the api name and whether the structure was input, output, or both; capture the value before cleanup or retry changes it. - In the
MQ_ERROR_ILLEGAL_PROPERTY_VALUEpath, the first failing property rather than only the aggregate hresult; compare it with a known-good call using the same account and queue type. - For this
MQ_ERROR_ILLEGAL_PROPERTY_VALUEresult, 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_PROPERTY_VALUE, 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_ILLEGAL_PROPERTY_VALUE, 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_PROPERTY_VALUE; change one precondition at a time. - In the
MQ_ERROR_ILLEGAL_PROPERTY_VALUEpath, 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_PROPERTY_VALUEresult, capture the complete aPropID/aPropVar/aStatus triples in original order. - For
MQ_ERROR_ILLEGAL_PROPERTY_VALUE, capture the API name and whether the structure was input, output, or both. - When diagnosing
MQ_ERROR_ILLEGAL_PROPERTY_VALUE, apply the code-specific recovery rule: Validate against the documentation for that exact property, not against a similarly named property.
Handling and recovery
Validate against the documentation for that exact property, not against a similarly named property.
When diagnosing MQ_ERROR_ILLEGAL_PROPERTY_VALUE, an immediate loop around the same call is not recovery. In the MQ_ERROR_ILLEGAL_PROPERTY_VALUE path, define who owns cancellation, handle recreation, transaction reconciliation, and duplicate suppression before another attempt is issued.
Nearby failure boundaries
In the MQ_ERROR_ILLEGAL_PROPERTY_VALUE path, changing a queue ACL or restarting the service does not correct an invalid identifier, VARTYPE, value, structure, or property combination. The specific focus for MQ_ERROR_ILLEGAL_PROPERTY_VALUE remains valid property with an invalid value.
- In the
MQ_ERROR_ILLEGAL_PROPERTY_VALUEpath, 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_ILLEGAL_PROPERTY_VALUEresult, granting broad queue or certificate permissions may mask the symptom while creating a security defect. ForMQ_ERROR_ILLEGAL_PROPERTY_VALUE, test the exact identity and access needed by the operation.
Worked example
A wrapper building mqpropvariant arrays encounters MQ_ERROR_ILLEGAL_PROPERTY_VALUE. For MQ_ERROR_ILLEGAL_PROPERTY_VALUE, it logs the rejected property index and rebuilds the request from a typed schema instead of retrying the same arrays. When diagnosing MQ_ERROR_ILLEGAL_PROPERTY_VALUE, 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_PROPERTY_VALUE, and test that a retry does not duplicate messages or directory objects.
References
- Microsoft: queue properties and MQQUEUEPROPS — source used for the
MQ_ERROR_ILLEGAL_PROPERTY_VALUEanalysis. - Microsoft: MSMQ message properties — source used for the
MQ_ERROR_ILLEGAL_PROPERTY_VALUEanalysis. - Microsoft: MQCreateQueue — source used for the
MQ_ERROR_ILLEGAL_PROPERTY_VALUEanalysis. - Microsoft: Message Queuing error and information codes — source used for the
MQ_ERROR_ILLEGAL_PROPERTY_VALUEanalysis.
Looking for a different code? Search another status or error code.