| Previous | Next |
| RO_E_BLOCKED_CROSS_ASTA_CALL | RO_E_CANNOT_ACTIVATE_UNIVERSAL_APPLICATION_SERVER |
RO_E_CANNOT_ACTIVATE_FULL_TRUST_SERVER
Universal application cannot activate a full-trust packaged WinRT server
RO_E_CANNOT_ACTIVATE_FULL_TRUST_SERVER is HRESULT 2147483680 (0x80000020) from winerror.h. AllStat describes it as “A universal application process cannot activate a packaged WinRT server that is declared to run full trust.” In the Windows Runtime metadata, object lifetime, asynchronous operation, activation, and apartment model, the code identifies a specific failure boundary and should not be replaced by a generic COM exception.
The caller should keep this result intact through logging, exception translation, and RPC or language projection boundaries.
Decisive interpretation boundary
Before choosing recovery, verify that the caller process trust level, package identity, server declaration, activation contract, and supported broker boundary are confirmed. If this condition cannot be proven for it, stop before consuming outputs or repeating side effects.
Also confirm that all observed objects, tokens, buffers, proxies, metadata files, or ACLs belong to the current operation generation and were not retained from an earlier attempt.
Where it is encountered
- C++/WinRT, WRL,.NET projections, or native WinRT ABI calls. Record the interface, method, component version, thread, apartment, process, and correlation ID.
- Runtime-class activation, WinMD reflection, asynchronous objects, observable state, or view lifecycle.
- Cross-thread and cross-apartment handoff between UI, ASTA, STA, MTA, broker, and background work.
The immediate focus for it is package activation where a universal application process requests a server declared for full-trust execution. Keep it attached to that operation; the same numeric severity outside the owning API does not supply enough context.
Correct handling and recovery
Move the privileged work behind an allowed app service or brokered contract, or use a server declaration compatible with the caller trust level. Do not weaken trust declarations as a workaround.
An unchanged retry loop for it can duplicate effects, deepen reentrancy, or hide an invalid lifetime transition.
Difference from nearby HRESULTs
It has a universal-app caller; RO_E_CANNOT_ACTIVATE_UNIVERSAL_APPLICATION_SERVER has a full-trust caller and incompatible server declaration.
A support tool discussing it should name the neighboring result only after the originating API and decisive state are known.
Lifetime, retry, and cleanup rules
After it, determine whether the current object, interface pointer, call context, token, stream, metadata reader, asynchronous operation, or access-control instance remains valid. Release only resources owned by the failing attempt, cancel callbacks through their documented mechanism, and avoid double close, double commit, repeated activation, or replay of a non-idempotent remote method.
The retry policy for it should state the trigger, maximum attempts, cancellation owner, and reconciliation step for effects that may have completed elsewhere.
Developer and administrator guidance
When it crosses native, managed, scripting, RPC, or WinRT projection boundaries, preserve the unsigned 32-bit HRESULT. Unit tests for it should assert the code-specific postcondition and resource ownership, not merely that an exception was thrown.
After it, avoid broad permission grants or system-wide resets unless code-specific evidence proves a global configuration problem. Define who owns retry, cancellation, cleanup, policy changes, package repair, and user-facing messaging for it.
Practical scenario
A UWP front end directly activates a packaged desktop WinRT server marked full trust. The design switches to an approved app-service boundary with validated inputs.
A regression test should reproduce it, assert the raw HRESULT and all relevant outputs, then correct only the decisive condition and verify the intended success or neighboring failure result.
References
- Microsoft: C++/WinRT error handling
- Microsoft: concurrency and asynchronous operations
- Microsoft: WinMD files
- Microsoft: IAgileObject
- Microsoft: COM apartments
- Microsoft: HRESULT values
Looking for a different code? Search another status or error code.
