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)

8282 questions
279
votes
4 answers

.net localhost website consistently making get arterySignalR/poll?transport=longPolling&connectionToken= calls

I created a new VS 2013 project and viewed the default.aspx page with the Firefox browser. When I check the net calls it has made, I see it making constant calls…
user2981059
  • 2,791
  • 2
  • 10
  • 3
163
votes
2 answers

How SignalR works internally?

Can anyone let me know how SignalR works internally in a high level way? I am guessing it is flushing the data using Response.Flush and at client side it is sending Ajax requests at certain intervals. Is it correct?
user960567
  • 28,664
  • 58
  • 165
  • 292
153
votes
5 answers

SignalR: Why choose Hub vs. Persistent Connection?

I've been searching and reading up on SignalR recently and, while I see a lot of explanation of what the difference is between Hubs and Persistent Connections I haven't been able to get my head around the next level, which is why would I choose one…
Craig W.
  • 16,585
  • 6
  • 44
  • 77
118
votes
3 answers

Can I incorporate both SignalR and a RESTful API?

I have a single page web app developed using ASP.NET. I recently converted many of the web methods to be push based, using the SignalR library. This really sped up the page considerably and reduced a lot of the server calls from the page. At the…
mbeasley
  • 4,584
  • 4
  • 24
  • 38
112
votes
1 answer

Using SignalR with Redis messagebus failover using BookSleeve's ConnectionUtils.Connect()

I am trying to create a Redis message bus failover scenario with a SignalR app. At first, we tried a simple hardware load-balancer failover, that simply monitored two Redis servers. The SignalR application pointed to the singular HLB endpoint. I…
ElHaix
  • 12,261
  • 24
  • 106
  • 193
107
votes
6 answers

SignalR - Sending a message to a specific user using (IUserIdProvider) *NEW 2.0.0*

In the latest version of Asp.Net SignalR, was added a new way of sending a message to a specific user, using the interface "IUserIdProvider". public interface IUserIdProvider { string GetUserId(IRequest request); } public class MyHub : Hub { …
Igor
  • 2,303
  • 3
  • 27
  • 49
93
votes
1 answer

Nodejs vs SignalR: why do we need server-side javascript?

Since I've known about Node.js, I've always been a fan of it. But today I found about SignalR, which provides an alternative asynchronous - scalable - realtime model for ASP.NET. As far as I know, the main advantage of Node.js over SignalR is…
Quan Mai
  • 13,021
  • 27
  • 90
  • 125
89
votes
5 answers

SignalR Console app example

Is there a small example of a console or winform app using signalR to send a message to a .net hub?. I have tried the .net examples and have looked at the wiki but it is not making sense to me the relationship between the hub(.net) and…
user685590
  • 2,263
  • 3
  • 26
  • 41
81
votes
2 answers

How to use SignalR hub instance outside of the hubpipleline

I am using SignalR to broadcast messages to all my clients. I need to trigger the broadcasting outside of my hub class i.e. something like below: var broadcast = new chatHub(); broadcast.Send("Admin","stop the chat"); I am getting error message…
Nitin Agrawal
  • 1,291
  • 1
  • 10
  • 19
77
votes
3 answers

Node.Js + Socket.IO vs SignalR vs C# WebSocket Server

I currently have a TCP server application written in .Net that receives and submits messages to clients. I am looking at building a web application so need the communication layer. I have built a Node.JS + Socket.IO app which connects to my TCP…
Jon
  • 35,719
  • 73
  • 218
  • 368
72
votes
5 answers

Call specific client from SignalR

I want to call specific client from server, and not broadcast to all of them. Problem is that I'm in scope of some AJAX request (in .aspx codebehind let say), and not in Hub or PersistentConnection, so don't have Clients property - and client who…
Hrvoje Hudo
  • 8,864
  • 5
  • 27
  • 41
72
votes
5 answers

Calling SignalR hub clients from elsewhere in system

I've set up a SignalR hub to communicate between the server and client. The hub server side code is stored in a class called Hooking.cs. What I want is to be able to call a method defined in Hooking.cs to allow me to broadcast messages to any…
Jordan Wallwork
  • 2,965
  • 1
  • 22
  • 45
72
votes
6 answers

Call SignalR Core Hub method from Controller

How can I call SignalR Core Hub method from Controller? I am using ASP.NET Core 2.0 with Microsoft.AspNetCore.SignalR (1.0.0-alpha2-final). I have windows service which communicate with Excel, SolidEdge ... When operation is complete it post…
Makla
  • 7,975
  • 9
  • 52
  • 118
71
votes
9 answers

The type or namespace IAppBuilder could not be found(missing using a directive pr an assembly reference)

I am working on an Asp.Net MVC 4 Application in which I am using SignalR 2.0.1 and I Mapped it using Owin Startup class and it worked fine at first. All of a sudden when I tried to rebuild my app it said that the type are namespace IAppbuilder could…
DoIt
  • 2,788
  • 7
  • 38
  • 78
64
votes
5 answers

SignalR + posting a message to a Hub via an action method

I am using the hub- feature of SignalR (https://github.com/SignalR/SignalR) to publish messages to all subscribed clients: public class NewsFeedHub : Hub public void Send(string channel, string content) { …
ollifant
  • 8,340
  • 10
  • 31
  • 45
1
2 3
99 100