| Previous | Next |
| ERROR_APPEXEC_NO_DONOR | ERROR_IO_REISSUE_AS_CACHED |
ERROR_APPEXEC_HOST_ID_MISMATCH
The AppExec host identifier does not match.
ERROR_APPEXEC_HOST_ID_MISMATCH is Win32 error 3066 (0xBFA). A host ID binds a request or resource to a particular execution host. The status prevents state prepared for one host from being applied to another, which is especially important across restarts, pooling, reconnects, and concurrent activations.
How host identities become crossed
- a response from one asynchronous request is delivered to another host context
- cache keys omit host ID and return handles or donor data from a different instance
- a host is replaced while queued work retains the predecessor’s identity
- serialization, truncation, or string normalization changes the identifier
- multi-user or multi-package routing selects a host from the wrong isolation boundary
Identity evidence
Capture expected and observed host IDs in a safe canonical form, host generations, request and activation correlation IDs, app/package/user/session, process creation times, route or pool key, reconnect history, and message source. Do not log secrets embedded in owner-specific tokens; hash opaque identifiers when necessary.
Diagnostic sequence
Trace where both identifiers were assigned and verify the correlation map at each async boundary. Check host replacement and generation changes, then invalidate all objects associated with the old ID. Confirm that PID, package name, or display name is not being used as a substitute for the real host identifier.
Reacquire state from the authoritative broker and submit a minimal request to the observed current host. If mismatches recur, audit queue partitioning, callback routing, and cache keys under concurrent activations.
Recovery and isolation
Reject the crossed request, release stale local state, obtain the correct host context, and replay only idempotent work. Never rewrite the expected ID merely to make the equality check pass.
Include host ID and generation in every request, response, handle wrapper, and cache entry. Tests should interleave two hosts with restarts and delayed callbacks to prove that state cannot migrate accidentally.
Difference from invalid host generation
ERROR_APPEXEC_INVALID_HOST_GENERATION can refer to an older lifetime of the same logical host. Error 3066 says the identifier itself is unexpected, potentially indicating cross-host routing rather than age alone.
Example
Two activation requests run concurrently, but a callback table is keyed only by package name. A response for host B reaches host A and returns 3066. Keying callbacks by request, host ID, and generation fixes the isolation bug.
References
Looking for a different code? Search another status or error code.
