What does HRESULT 0x80220002 (WCM_E_STATENODENOTALLOWED) mean?

 
Previous Next
WCM_E_STATENODENOTFOUND WCM_E_ATTRIBUTENOTFOUND

WCM_E_STATENODENOTALLOWED

WCM_E_STATENODENOTALLOWED is the failure HRESULT 0x80220002 (signed decimal -2145255422, unsigned decimal 2149711874). Its severity bit is 1, facility is 34 (FACILITY_STATE_MANAGEMENT), and the facility-specific code field is 0x0002.

AllStat records the Windows SDK description as “State node is not allowed.”

Interpretation without overreach

The requested state node is forbidden by the schema context. The operation reached schema validation of a node being created, loaded, or used beneath a particular parent. The first branch to test is whether a setting appears under a parent that does not declare that child; keep that separate from the possibility that an answer-file fragment uses a node valid in another configuration pass or namespace.

SMI object or metadata boundary

At this boundary, capture the rejected node name and its full parent path, then correlate it with setting type of the parent and the child list exposed by ISettingsItem::Children. Assign ownership only after checking source manifest version, configuration pass, namespace identity, and target build.

Common origins

  • a setting appears under a parent that does not declare that child
  • an answer-file fragment uses a node valid in another configuration pass or namespace
  • the caller tries to create a schema-defined singleton or non-creatable metadata node
  • a manifest revision changed containment rules while tooling still emits an older tree shape

Useful artifacts

  • the rejected node name and its full parent path
  • setting type of the parent and the child list exposed by ISettingsItem::Children
  • source manifest version, configuration pass, namespace identity, and target build
  • ISettingsResult source line and surrounding XML context
  • a known-good fragment showing the permitted location for the same setting

How to isolate the defect

  • locate the node at the line reported by ISettingsResult
  • compare its parent-child relationship with the namespace metadata
  • move the node only to a schema-declared location; do not suppress validation
  • regenerate the answer-file fragment with tooling matched to the target image
  • validate the reduced namespace before merging it back into the full deployment file

When another attempt is justified

Do not retry an unchanged document. Recovery requires changing the tree structure or selecting the namespace/configuration context in which that node is legal.

Related result codes

WCM_E_STATENODENOTFOUND concerns absence during lookup; WCM_E_DUPLICATENAME reports a name collision. NOTALLOWED means the node exists in the input but violates placement or operation rules.

Example from an offline image

A customization places a per-component setting at the namespace root. SMI recognizes the element name but rejects that parent-child relationship.

Developer and administrator notes

For operational telemetry, retain source manifest version, configuration pass, namespace identity, and target build; also record ISettingsResult source line and surrounding XML context. Preserve a redacted summary of a known-good fragment showing the permitted location for the same setting; use a cryptographic hash when that evidence is a file, stream, or generated artifact.

Official Microsoft references.


Looking for a different code? Search another status or error code.