| Previous | Next |
| ERROR_NO_WORK_DONE | ERROR_INVALID_EA_NAME |
ERROR_VC_DISCONNECTED
The session was canceled.
ERROR_VC_DISCONNECTED is Windows system result 240 (0x000000F0). Microsoft defines it as “The session was canceled.”
How to classify the result
This result represents a canceled or disconnected session. The correct interpretation depends on the connection-oriented transport, redirector, provider, or legacy subsystem that owned the virtual circuit at the moment of cancellation.
Where it can appear
- This result can appear in a legacy network provider or redirector operation.
- This result can appear in a session-oriented RPC, terminal, or device-management channel that maps its native status to Win32.
- It can appear in a long-running request whose underlying connection is closed by either endpoint.
Typical causes
- the remote endpoint deliberately canceled the session.
- a service restart or failover invalidated an established channel.
- idle timeout, keepalive policy, or intermediate network equipment removed the state.
- the caller reused a handle after disconnect notification.
- a lower-level transport error was translated to the generic virtual-circuit result.
Useful evidence
- Record local and remote endpoint addresses.
- Record session, connection, or handle identifier.
- Record first lower-level transport status.
- Record bytes or protocol phase completed before disconnect.
- Record service restart, failover, and timeout events.
Recovery and retry
Create a new session after the owning provider is ready, then repeat only the smallest operation whose completion is known to be absent.
A bounded reconnect is reasonable for transient transport loss; an immediate loop on the same canceled handle is not. Mutating requests require an application-level completion check first.
Difference from related results
It denotes loss or cancellation of a session. ERROR_CONNECTION_ABORTED and ERROR_REQUEST_ABORTED can describe different layers and should not be substituted without preserving the original code.
Example
A management agent sends a request, the remote service restarts, and the next receive returns it. The agent records the session ID, opens a new channel, queries whether the requested change committed, and only then decides whether to resend.
Developer and administrator guidance
Client code should separate reconnection from request retry and expose the original provider status. Operators should inspect both endpoints before blaming DNS or credentials, because an established session already existed.
References
Looking for a different code? Search another status or error code.