| Previous | Next |
| RPC_S_UNSUPPORTED_TYPE | RPC_S_INVALID_BOUND |
RPC_S_INVALID_TAG
The marshaled union tag does not identify an allowed branch
RPC_S_INVALID_TAG is an NDR data-validation fault associated with a discriminated union. The transmitted switch value did not match a declared case and the IDL did not provide a default arm. The problem can come from malformed wire data, incompatible IDL versions, or application code that constructs a union with a tag inconsistent with the active member.
Compare the exact interface UUID/version and generated stubs at both endpoints. Log the discriminant before the call and inspect whether custom serialization, proxy code, or hand-built buffers modify it. Retrying the same buffer cannot repair the mismatch. Robust MIDL validation is valuable because it rejects an invalid arm before manager code interprets memory using the wrong type.
What to inspect
- Inspect the union switch type and every declared case value in the IDL.
- Confirm client and server use stubs generated from the same interface definition.
- Treat unexpected remote input as a protocol-validation failure, not a transient transport error.
References
- Microsoft: NDR unmarshaling and union handling
- MS-RPCE: NDR, IDL, and transfer-syntax terminology
- Microsoft: RPC invalid-tag return value
Looking for a different code? Search another status or error code.