Websocket is connected or disconnected without error Blazor Web App .Net 8

Prathamesh Shende 511 Reputation points
2025-07-27T11:45:52+00:00

Hello,
Websocket not connected in production returns the error

WebSocket connection to 'wss://accounts.innovustech.in/_blazor?id=7pvrUUJdL7CjvoTLn17Y4A' failed:

(anonymous) @ blazor.web.js:1

blazor.web.js:1 [2025-07-27T11:40:20.323Z] Information: (WebSockets transport) There was an error with the transport.

blazor.web.js:1 [2025-07-27T11:40:20.323Z] Error: Failed to start the transport 'WebSockets': Error: WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.

log @ blazor.web.js:1

blazor.web.js:1 [2025-07-27T11:40:20.496Z] Warning: Failed to connect via WebSockets, using the Long Polling fallback transport. This may be due to a VPN or proxy blocking the connection. To troubleshoot this, visit https://aka.ms/blazor-server-using-fallback-long-polling.

log @ blazor.web.js:1

blazor.web.js:1 [2025-07-27T11:40:20.760Z] Error: There was an unhandled exception on the current circuit, so this circuit will be terminated. For more details turn on detailed exceptions by setting 'DetailedErrors: true' in 'appSettings.Development.json' or set 'CircuitOptions.DetailedErrors'.

log @ blazor.web.js:1

blazor.web.js:1 [2025-07-27T11:40:20.809Z] Information: Connection disconnected.

/_blazor?id=gKD-9FEuzfl-Wc0p3ts6rQ:1 Failed to load resource: the server responded with a status of 404 ()

blazor.web.js:1 [2025-07-27T11:40:20.822Z] Warning: Failed to deliver completion notification for render '2'.

On prod Windows Hosting,
I have enabled WebSocket. also web.config files has webSocket enabled is "true"
the hosting model is inprocess

Developer technologies | .NET | Blazor
0 comments No comments
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 79,101 Reputation points Volunteer Moderator
    2025-07-27T16:07:17.58+00:00

    Be sure any firewall proxy, load balancer, or cache server supports websockets. This can be an issue on the client or server side.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.