Overview
Blazor Server applications use SignalR for real-time communication between the browser and server. Connection issues can cause your app to become unresponsive or display "Attempting to reconnect" messages.
Common Symptoms
- "Attempting to reconnect to the server" message appears
- "Could not reconnect to the server" error
- Application freezes or becomes unresponsive
- Buttons and interactive elements stop working
Check First: 403 Forbidden on the negotiate Request
If the browser's Network tab (F12) shows the request to /_blazor/negotiate or to your hub's /negotiate address returning 403, the Web Application Firewall on your site is rejecting it. This is the most common reason a Blazor or SignalR app loads but never connects on our hosting, and it is fixed in Plesk without changing your code.
Solution: switch off firewall rule 920420 for the site. See SignalR or Blazor negotiate request returns 403 Forbidden (Web Application Firewall rule 920420) for the steps.
Cause 1: WebSocket Connection Issues
SignalR uses WebSockets by default. If WebSockets are blocked, connections fail.
Solution: Ensure WebSockets are enabled in Plesk:
- This is typically enabled by default on our Windows hosting
- If issues persist, contact support to verify WebSocket configuration
Cause 2: HTTPS/SSL Issues
Mixed content or SSL issues can block SignalR connections.
Solution:
- Ensure your site uses HTTPS exclusively
- Enable "Force HTTPS" in Plesk SSL settings
- Verify SSL certificate is valid and not expired
Cause 3: Application Pool Recycling
When the application pool recycles, all SignalR connections are dropped.
Solution: Adjust Application Pool settings in Plesk:
- Go to Websites & Domains → Dedicated IIS Application Pool
- Increase Idle Timeout (default 20 minutes)
- Increase Private Memory Limit if your app needs more memory
Cause 4: Proxy or Load Balancer Timeout
Long-running connections may be terminated by timeouts.
Solution: Configure SignalR for longer timeouts in Program.cs:
builder.Services.AddServerSideBlazor()
.AddHubOptions(options =>
{
options.ClientTimeoutInterval = TimeSpan.FromSeconds(60);
options.HandshakeTimeout = TimeSpan.FromSeconds(30);
options.KeepAliveInterval = TimeSpan.FromSeconds(15);
});
Cause 5: Large Payload Issues
Very large data transfers can cause connection issues.
Solution: Increase maximum message size:
builder.Services.AddServerSideBlazor()
.AddHubOptions(options =>
{
options.MaximumReceiveMessageSize = 1024 * 1024; // 1MB
});
Debugging SignalR Issues
Enable detailed SignalR logging in appsettings.Development.json:
{
"Logging": {
"LogLevel": {
"Microsoft.AspNetCore.SignalR": "Debug",
"Microsoft.AspNetCore.Http.Connections": "Debug"
}
}
}
Alternative: Use WebAssembly
If SignalR issues persist, consider Blazor WebAssembly which runs entirely in the browser and does not require a persistent connection.