| Previous | Next |
| E_PROTOCOL_EXTENSIONS_NOT_SUPPORTED | E_PROTOCOL_VERSION_NOT_SUPPORTED |
E_SUBPROTOCOL_NOT_SUPPORTED
E_SUBPROTOCOL_NOT_SUPPORTED (0x83760004) means the Windows protocol component encountered WebSocket subprotocol negotiation has no acceptable match. The peer does not select one of the application protocols offered during the opening handshake, or the returned selection cannot be mapped to the offered list. For E_SUBPROTOCOL_NOT_SUPPORTED, identify the failing layer before changing HTTP, TLS, or application payload settings.
Capture negotiation strings
- Keep the ordered client offer from Sec-WebSocket-Protocol.
- Record the exact server-selected token, including case and separators.
- Preserve the API index returned by handshake completion.
Meaning of subprotocol
A subprotocol such as a domain-specific messaging protocol defines application semantics above WebSocket. It is not the same as a WebSocket extension and cannot be invented after the connection opens.
Controlled checks
- Connect without requiring a subprotocol only if the application contract permits it
- Offer exactly one known server-supported token
- Verify proxies do not rewrite or remove the negotiation header
Proof
The server selects a token from the original offer and both endpoints execute the same application protocol. A successful bare WebSocket connection is insufficient when the application requires a subprotocol.
Subprotocol tokens are negotiated, not inferred
The selected Sec-WebSocket-Protocol value must be one token from the client offer. Do not accept a server choice merely because the application understands a similar name, version prefix, or case variant. An empty selection is also different from selecting an unsupported token.
Two independent axes for E_SUBPROTOCOL_NOT_SUPPORTED
| Comparison | What it reveals |
|---|---|
| Same artifact, different implementation | Whether the representation is independently rejected |
| Known-good artifact, same environment | Whether the local stack fails without production-specific input |
| Original operation, one isolated change | Whether the proposed correction controls the observed result |
| Deliberate boundary violation | Whether validation remains active after the change |
Safe logging for E_SUBPROTOCOL_NOT_SUPPORTED
Capture E_SUBPROTOCOL_NOT_SUPPORTED with the operation, byte count, parser or statement position, and contract version, replacing sensitive bodies with hashes and bounded excerpts without losing the state needed to reproduce the event.
Opening handshake evidence for E_SUBPROTOCOL_NOT_SUPPORTED
| Boundary | Required evidence |
|---|---|
| Client request | Method, target, Host, Upgrade, Connection, key, version, protocols, and extensions |
| Server response | Status, Upgrade, Connection, accept value, selected protocol, and extensions |
| Windows API inputs | Arrays, counts, and selected indices passed before the return |
| Post-handshake actions | Action types, buffers, context tokens, and completion calls |
Deterministic protocol boundary for E_SUBPROTOCOL_NOT_SUPPORTED
Capture the first peer bytes or API transition yielding E_SUBPROTOCOL_NOT_SUPPORTED; backoff can limit a reconnect storm but cannot repair negotiation or state, and direct versus proxied tests may differ because an intermediary can terminate and recreate the WebSocket.
Regression sequence for E_SUBPROTOCOL_NOT_SUPPORTED
- Complete a baseline RFC 6455 handshake without optional extensions
- Exchange text and binary messages through the documented action loop
- Perform a clean close in both directions
- Introduce only the version, protocol, extension, frame, or call-order defect represented here
Wire and API ownership for E_SUBPROTOCOL_NOT_SUPPORTED
| Boundary | Responsibility |
|---|---|
| HTTP upgrade | Owns request and response header syntax before the session opens |
| WebSocket framing | Owns opcode, masking, reserved bits, length encoding, fragmentation, and control-frame rules |
| Negotiated feature | Owns extension or subprotocol selection and its parameters |
| Windows action loop | Owns local handle state, buffers, action completion, and close sequencing |
Technical references for E_SUBPROTOCOL_NOT_SUPPORTED
- Microsoft Open Specifications: HRESULT values
- Microsoft WebSocket handshake completion
- Microsoft WebSocket action queue API
- RFC 6455: The WebSocket Protocol
Looking for a different code? Search another status or error code.