| Previous | Next |
| ERROR_OPEN_FILES | ERROR_DEVICE_IN_USE |
ERROR_ACTIVE_CONNECTIONS
Active connections still exist.
ERROR_ACTIVE_CONNECTIONS is Win32 error 2402 (0x962). The code is used by more than one Windows subsystem, so “connection” must be interpreted from the API that returned it. In networking it can block removal of shared connection state; in other APIs it can mean live consumers still reference the object being stopped or deleted.
Why teardown sees live dependents
- several shares, drive mappings, sessions, rules, or clients depend on one underlying connection or object
- cleanup targets a parent resource before child sessions have been stopped
- another process or service is still attached even though the initiating application appears idle
- asynchronous shutdown has begun but completion has not yet reached the owner
- inventory is stale and the administrator attempts deletion without first enumerating current references
Context-first telemetry
Record the exact API and object type, parent identifier, dependent connection count and identities where safe, caller/session, shutdown phase, creation owners, last activity, retry number, and subsystem-specific extended status. The numeric code alone is insufficient to choose WNet, tracing, firewall, or another recovery path.
Diagnostic sequence
Start with the returning API documentation and enumerate its dependents through that subsystem’s supported interfaces. Stop new attachments, request orderly closure, and wait for completion notifications before retrying the parent operation.
Check cross-process and service ownership. If the object is a network connection, inspect related mappings and sessions; if it is a trace or policy object, identify consumers that still reference it. Avoid applying a network-specific force flag to an unrelated API.
Recovery and orchestration
Close or migrate dependent connections, then retry the original teardown. Force removal only when the owning API documents the consequences and the operator accepts interruption or data-loss risk.
Model resources as dependency graphs and delete in reverse creation order. Administrators should schedule disruptive cleanup in a maintenance window when connections belong to other users or services.
Difference from ERROR_OPEN_FILES
ERROR_OPEN_FILES identifies open files or pending requests on a network connection. Error 2402 is broader and may come from non-WNet subsystems, so the calling API is essential to interpretation.
Example
A controller removes a shared parent connection after closing only its own drive mapping. Another service still has a dependent session, so deletion returns 2402. Enumerating and draining all child sessions makes the parent removable.
References
- Microsoft: System Error Codes (1700–3999)
- Microsoft: Win32 Error Codes in MS-ERREF
- Microsoft: ControlTrace
- Microsoft: WNetCancelConnection2
Looking for a different code? Search another status or error code.