ASP.NET Core SignalR

Real-time web communication library for ASP.NET Core — abstracts WebSockets, Server-Sent Events, and Long Polling for push notifications and bidirectional streaming. SignalR features: Hub classes for server-side logic (class AgentHub : Hub { public async Task SendUpdate(string message) { await Clients.All.SendAsync("ReceiveUpdate", message); } }), typed hubs (IAgentHubClient interface), group management (Groups.AddToGroupAsync), connection management, and automatic reconnection. Scales to multiple servers via Azure SignalR Service or Redis backplane. Client libraries for JavaScript (@microsoft/signalr), .NET, Java, and Swift. Used for real-time agent task progress, streaming LLM responses, and collaborative agent interfaces.

Evaluated Mar 06, 2026 (0d ago) v8.x
Homepage ↗ Repo ↗ Developer Tools dotnet csharp websockets realtime signalr hub push asp-net
⚙ Agent Friendliness
64
/ 100
Can an agent use this?
🔒 Security
86
/ 100
Is it safe for agents?
⚡ Reliability
88
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
88
Error Messages
82
Auth Simplicity
82
Rate Limits
85

🔒 Security

TLS Enforcement
90
Auth Strength
85
Scope Granularity
82
Dep. Hygiene
90
Secret Handling
85

SignalR requires HTTPS in production — configure HSTS; WebSocket connections over HTTP are unencrypted. Validate hub callers are authorized for each agent-specific group/connection they join. Use typed hubs to enforce message contracts. Token-in-query-string is logged in server access logs — ensure production logs don't retain agent auth tokens.

⚡ Reliability

Uptime/SLA
90
Version Stability
90
Breaking Changes
88
Error Recovery
85
AF Security Reliability

Best When

Your .NET agent application needs real-time push from server to browser — agent task progress, streaming LLM responses, or collaborative features — SignalR handles connection management and scaling automatically.

Avoid When

You need mobile push, high-throughput event streaming, microservice messaging, or your UI can use polling without UX degradation.

Use Cases

  • Real-time agent task progress streaming — AgentHub.SendProgress(connectionId, progressPercent) pushes agent task completion percentage to specific browser connection; JavaScript client receives via connection.on('Progress', (pct) => updateUI(pct))
  • LLM response streaming to browser — await Clients.Client(connectionId).SendAsync('AgentToken', token) streams each LLM token to agent chat UI as generated; progressive display without polling
  • Agent collaboration presence — Groups.AddToGroupAsync(connectionId, agentId.ToString()) tracks who is viewing each agent; Clients.Group(agentId).SendAsync('UserJoined', username) broadcasts presence to agent collaborators
  • Multi-server agent notifications via Azure SignalR Service — UseAzureSignalR(connectionString) replaces in-process hub with Azure-managed SignalR; agent notifications reach clients connected to any server instance
  • Typed hub for agent event contracts — interface IAgentClient { Task ReceiveStatus(AgentStatus status); }; class AgentHub : Hub<IAgentClient> { await Clients.All.ReceiveStatus(status); } compile-time safe agent event contract

Not For

  • High-throughput event streaming — SignalR is designed for interactive real-time UIs; for streaming millions of agent events/second, use Kafka, Azure Event Hubs, or server-sent events with dedicated streaming infrastructure
  • Mobile push notifications — SignalR WebSocket connections don't work reliably in mobile background; use Apple APNs or Firebase FCM for agent mobile push notifications
  • Service-to-service messaging — SignalR is optimized for browser-to-server communication; for agent microservice messaging, use RabbitMQ, Azure Service Bus, or MassTransit

Interface

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: bearer_token cookie
OAuth: No Scopes: No

SignalR hub connections authenticated via JWT bearer or cookie sent during WebSocket handshake. Configure options.Events.OnMessageReceived to extract token from query string for WebSocket (WebSocket headers not supported for auth token).

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

ASP.NET Core SignalR is MIT licensed and free for self-hosted use. Azure SignalR Service has managed hosting costs for production scale.

Agent Metadata

Pagination
none
Idempotent
Partial
Retry Guidance
Documented

Known Gotchas

  • WebSocket auth token must be in query string — browsers cannot set Authorization header on WebSocket connections; SignalR JavaScript client sends JWT via access_token query parameter; server reads from context.Request.Query['access_token'] in OnMessageReceived event; standard Authorization header auth fails for agent SignalR WebSocket connections
  • Multiple server SignalR requires backplane — SignalR connections are server-affinity; agent users connected to Server A don't receive messages sent from Server B; configure Redis backplane (AddStackExchangeRedis) or Azure SignalR Service for multi-instance agent deployments; single-server works without backplane
  • Hub lifetime is per-request not per-connection — Hub instances are created fresh for each hub method invocation; don't store state in Hub instance properties; use IHubContext<AgentHub> for sending from outside Hub (background services); Hub.Context persists across method calls but Hub instance does not
  • Clients.Others vs Clients.All for echo prevention — Clients.All.SendAsync includes the calling connection; Clients.Others.SendAsync excludes caller; Clients.Caller.SendAsync sends only to caller; for agent collaborative editing, use Clients.OthersInGroup(agentId) to broadcast without echo to sender
  • Groups not persistent across reconnects — AddToGroupAsync adds connection to group; on disconnect and reconnect, new connection ID is assigned and group membership is lost; agent clients must re-join groups on reconnection; use OnConnectedAsync to restore group membership from user's agent context
  • MaxParallelInvocationsPerClient default is 1 — by default SignalR processes one hub method per client at a time; agent clients sending rapid messages queue behind in-progress calls; configure options.MaxParallelInvocationsPerClient > 1 if agent hub methods have async wait time; too high can overload server with concurrent agent processing

Alternatives

Full Evaluation Report

Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for ASP.NET Core SignalR.

$99

Scores are editorial opinions as of 2026-03-06.

5220
Packages Evaluated
26151
Need Evaluation
173
Need Re-evaluation
Community Powered