You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aspnetcore/signalr/troubleshoot.md
+12-3Lines changed: 12 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,12 @@
1
1
---
2
2
title: ASP.NET Core SignalR connection troubleshooting
3
+
ai-usage: ai-assisted
3
4
author: wadepickett
4
5
description: ASP.NET Core SignalR connection troubleshooting.
5
6
monikerRange: '>= aspnetcore-2.1'
6
7
ms.author: wpickett
7
8
ms.custom: mvc
8
-
ms.date: 04/08/2020
9
+
ms.date: 03/25/2026
9
10
uid: signalr/troubleshoot
10
11
---
11
12
# Troubleshoot connection errors
@@ -14,18 +15,26 @@ This section provides help with errors that can occur when trying to establish a
14
15
15
16
### Response code 404
16
17
17
-
When using WebSockets and `skipNegotiation = true`
18
18
```log
19
19
WebSocket connection to 'wss://xxx/HubName' failed: Error during WebSocket handshake: Unexpected response code: 404
20
20
```
21
21
22
+
**General causes (all configurations):**
23
+
24
+
* Verify the client is connecting to the correct endpoint. For example, the server is hosted at `http://127.0.0.1:5000/hub/myHub` and the client is trying to connect to `http://127.0.0.1:5000/myHub`.
25
+
26
+
**When using the default negotiation flow (`skipNegotiation = false`):**
27
+
22
28
* When using multiple servers without sticky sessions, the connection can start on one server and then switch to another server. The other server is not aware of the previous connection.
23
-
* Verify the client is connecting to the correct endpoint. For example, the server is hosted at `http://127.0.0.1:5000/hub/myHub` and client is trying to connect to `http://127.0.0.1:5000/myHub`.
24
29
* If the connection uses the ID and takes too long to send a request to the server after the negotiate, the server:
25
30
26
31
* Deletes the ID.
27
32
* Returns a 404.
28
33
34
+
**When using WebSockets with `skipNegotiation = true`:**
35
+
36
+
* Since negotiation is skipped and no connection ID is obtained from `/negotiate`, the sticky session and connection ID timeout scenarios don't apply. A 404 in this case typically means the WebSocket endpoint URL is incorrect or the hub isn't mapped on the server.
0 commit comments