Questions tagged [signalr]

ASP.NET SignalR is a library for ASP.NET developers that makes it simple to add real-time functionality to your web applications. That is, to have your server-side code push content to the connected clients as it happens, in real-time.

SignalR is an asynchronous library for .NET to help build real-time, multi-user interactive web applications.

SignalR lets you communicate with clients on your website in real time through the best continuous connections available between browser and server (WebSocket between Chrome and IIS 8, but long polling between Internet Explorer 9 and IIS 7.5).

SignalR allows you to call methods from the server on the client (.NET , JavaScript, Java) and reciprocally. You can invoke methods on every client or a subset of clients.

Extensive documentation and guides are found here.

SignalR can be downloaded through NuGet here.

The source code is available on GitHub.

The JavaScript client package (jQuery plugin)

9391 questions
31
votes
3 answers

SignalR doesn't use Session on server

When I try to access the HttpContext current session from the HUB it returns null. I tried making use of the interface IRequiresSession but it didn't work. Can someone help me?
Danillo Corvalan
  • 703
  • 1
  • 10
  • 19
31
votes
2 answers

WithUrl() not found in Core 3 client

My .NET SignalR client code not working any more in Core 3 (WPF): string hubAddress = "https://localhost:44329/Hub"; HubConnection hub = new HubConnectionBuilder().WithUrl(hubAddress).Build(); // WithUrl not found MS document said it is…
David Tsui
  • 433
  • 1
  • 5
  • 8
31
votes
3 answers

SignalR + Autofac + OWIN: Why doesn't GlobalHost.ConnectionManager.GetHubContext work?

I'm trying to use OWIN, SignalR and Autofac in a single project. I'm setting things up with regards to signalR as follows: // Create the AutoFac container builder: var builder = new ContainerBuilder(); // ...[Register various…
mutex
  • 7,536
  • 8
  • 45
  • 66
31
votes
1 answer

SignalR OnDisconnected - a reliable way to handle "User is Online" for chatroom?

I'm implementing a chat room. So far, so good - users can send messages from their browsers via a JS client, and I can use a C# client to do the same thing - these messages get broadcast to other users. Now, I'm trying to implement "online…
SB2055
  • 12,272
  • 32
  • 97
  • 202
31
votes
4 answers

SignalR with Web Sockets

I am attempting to get websockets working in my dev environment: Visual Studio 2010 Windows 7 Signal R 0.51 Latest Chrome / Firefox Unfortunately the Javscript client is using long polling. When I force web-sockets on the client side I can't…
Luke Belbina
  • 5,708
  • 12
  • 52
  • 75
30
votes
4 answers

SignalR MVC 5 Websocket no valid Credentials

i try to use SignalR in MVC Application. It works well but i get the following Error in the Chrome console WebSocket connection to…
Konobi
  • 401
  • 1
  • 6
  • 14
30
votes
1 answer

Should signalr server-side methods be async when calling Clients?

I'm following the "SignalR Tutorial" on : http://www.asp.net/signalr/overview/hubs-api/hubs-api-guide-server So let's assume this simple Chat Method : public void Send(string name, string message) { // Call the addNewMessageToPage method to…
Daniel Marcotte
  • 1,270
  • 3
  • 16
  • 27
30
votes
2 answers

Is there a Java equivalent of SignalR?

I've got a really simple question but I find nothing interesting on Google. Is there a Java equivalent of SignalR (.NET) ? SignalR is a .NET framework that implements Websockets with a fallback for old browsers. Really thx to you.
Thomas Pons
  • 7,709
  • 3
  • 37
  • 55
30
votes
5 answers

Push data to client using SignalR vs WCF?

I have one WPF client-server application. Now I have scenario like client will connect to server and server will push data to client periodically. I am bit confused about what technology and way should I choose for notification to clients. SignalR…
Upendra Chaudhari
  • 6,473
  • 5
  • 25
  • 42
29
votes
7 answers

How to determine server disconnection from SignalR client?

How can a SignalR JavaScript client detect when a connection with the server is lost?
Alexandr
  • 695
  • 2
  • 9
  • 18
29
votes
3 answers

SignalR 2.0.2 and Owin 2.0.0 dependency conflict

I'm trying to get SignalR working in an MVC5 project with individual accounts. The MVC project has by default Owin 2.0.0 and all of the Owin.* components are also 2.0.0. So I used NuGet to get all the SignalR packages, it automatically resolved…
neo112
  • 1,703
  • 2
  • 17
  • 39
29
votes
2 answers

Broadcasting message to all clients except self in SignalR

I realize that these questions are similar: SignalR - Broadcast to all clients except Caller Send a message to all clients in a Group, except for the current client However, they are old and nothing in the current documentation gave me any clues…
Icarus
  • 63,293
  • 14
  • 100
  • 115
29
votes
3 answers

Self hosted OWIN and urlacl

I've created a self hosted Nancy/SignalR application self-hosted in OWIN using Microsoft.Owin.Host.HttpListener and Microsoft.Owin.Hosting Things work perfectly fine locally but as soon as I try to use anything but localhost to access the app I get…
kay.one
  • 7,622
  • 6
  • 55
  • 74
29
votes
8 answers

Ignore persistent SignalR connections in New Relic

Where should I call NewRelic.Api.Agent.NewRelic.IgnoreApdex() or NewRelic.Api.Agent.NewRelic.IgnoreTransaction() in my SignalR hubs to prevent long-running persistent connections from overshadowing my application monitoring logs?
Petrus Theron
  • 27,855
  • 36
  • 153
  • 287
28
votes
3 answers

Web API / OWIN, SignalR & Authorization

I am developing a prototype of an AngularJS, Web API, SignalR application as a potential starting point for a new project in VS 2013. At this stage, I'm pretty much using the canned code that visual studio generates for Individual User…
Peter Trenery
  • 781
  • 1
  • 7
  • 11