Click here to Skip to main content
15,891,513 members
Everything / SignalR

SignalR

SignalR

Great Reads

by Altaf Ansari
SignalR Real-Time ChatApp with Emoji / Smiley and sending file attachment
by Altaf Ansari
Integration of SignalR with ASP.NET C# WebForm Application in Real-Time Chat Application
by Mustafa Kok
SignalR server and client applications for demonstrating common scenarios like connecting, disconnecting, joining and leaving groups, sending messages to all clients, to specific or group of clients
by dsuryd
Application of "MVVM over SignalR" library described in a previous CodeProject tip, combined with Dynamic LINQ library to do incremental web search by typing the query

Latest Articles

by Zoltán Zörgő
One application, multiple SignalR endpoints with different hubs
by Pusparag Subudhi
Extending SignalR to push EF change notification to connected client applications
by Pusparag Subudhi
A WPF application can be made more interactive and deployment friendly by using SignalR to our advantage. This is Part 1 showing how SignalR can be implemented in a WPF application for two-way communication and synchronization.

All Articles

Sort by Updated

SignalR 

18 Aug 2023 by pkfox
I have a self hosted website on my LAN which contains a SignalR hub endpoint. On receipt of the incoming payload, it is added to a generic list which my Razor _layout.cshtml view renders. All works well but the data isn't rendered until I reload...
18 Aug 2023 by Graeme_Grant
You could use SignalR with javascript: signalr javascript example - Google Search[^] - that should point you in the right direction. UPDATE An alternative is to use server-side Blazor. Then you can write it all in C#. Under the covers,...
30 Jun 2023 by Cameron van Rooyen
Question How do I create the relationship between the support team member and partner user in my chatHub and then save the messages that they have sent to one another in my SQL database. Note, I am using ASP.NET identity framework for my user...
16 Jun 2023 by Zoltán Zörgő
One application, multiple SignalR endpoints with different hubs
2 Jan 2023 by Member 3153152
Hello All.......I am new in Asp.Net Web development..........I want to generate database change notification using SignalR, for this, I am using SQL Server 2008 R2.I am getting failure with following command ALTER DATABASE SignalRDummy SET ENABLE_BROKER.It says "Msg 1205,...
2 Jan 2023 by MMMMMD
hi, using this query for solve your Problem: ALTER DATABASE SignalRDummy SET ENABLE_BROKER WITH ROLLBACK IMMEDIATE
17 Apr 2022 by Pusparag Subudhi
Extending SignalR to push EF change notification to connected client applications
13 Oct 2021 by Pusparag Subudhi
A WPF application can be made more interactive and deployment friendly by using SignalR to our advantage. This is Part 1 showing how SignalR can be implemented in a WPF application for two-way communication and synchronization.
30 Sep 2021 by Member 15329613
You have to write your own code. No one here will write all the code for you. But if you get stuck on a specific point we'd gladly help.
26 Jul 2021 by amsga
Hi All, I am trying to provide the same results from both an existing Web API Controller as well as a new SignalR Hub. I am trying as much as possible not to duplicate the same code in both the Hub and Web API Controller. Any advice or links to...
23 Jul 2021 by lmoelleb
Do not put logic into the controller. Typically a web controller should: 1) Take any incoming parameters and convert to whatever data model the domain layer (a.k.a. business logic and other things) needs. 2) Call the domain layer with a single...
13 Apr 2021 by gacar
I have a SignalR project. Can i use cache some records? And how? What I have tried: I haven't any idea. codeproject alert: Both the question and 'What have you tried' must be between 30 and 50000 characters.
13 Apr 2021 by Dave Kreskowiak
With such a poor question, the only answer you're going to get is a generic one. Yes. How is dependent on your requirements and existing code, which I seriously doubt you have. This also has nothing to do with SignalR. SignalR just handles...
13 Apr 2021 by sasko1
Hi! I have maybe stupid question? I need to choose functionalities for project that is going to contain web forms, .net core api and xamarin mobile app. What I have tried: For last project i made chat app with .net core web application and...
13 Apr 2021 by Dave Kreskowiak
That's the nice part about SignalR. It's completely environment agnostic. It doesn't care what kind of application, web or not, you're writing. It's server is entirely separate from your application.
25 Feb 2021 by Member 15067806
I have recently heard about signalR. I want to display Realtime data on web application. I have a console application in asp.net which receives Realtime data from a device and sends on udp port. This udp data sent by console application should be...
28 Jan 2021 by sasko1
Hi! I am trying to make chat app and i am trying to figure out best way to keep track of user connectionIDs. I am saving connectionID OnConnectedAsync to database and OdDisconnectedAsync removing That connectionID from database. My problem is...
24 Jan 2021 by sasko1
Hi! I have problem with client side implementation of signalrHub. This is my ChatHub hub public class ChatHub : Hub { public string GetConnectionId() { return Context.ConnectionId; } public...
24 Jan 2021 by Richard Deeming
Think about what you're asking. When a client disconnects from your hub, and will no longer receive any messages from your server... ... you want to send a message from the server to that client telling them they've disconnected. That...
24 Jan 2021 by sasko1
Hi! I am trying to make something like customer service chat with signalr. I am able to use signalr to send message to every client but struggle with getting connectionID value anywhere outside of ChatHub so i could send to induvidual clients. ...
24 Jan 2021 by sasko1
I solved it like this connection.start().then(function () { connection.invoke('GetConnectionId') .then(function (connectionId) { //alert(connectionId); })
22 Jan 2021 by Christian Graus
Clearly you need to write the getconnectionid method, in order to take a value on your server, and share it with clients. Are you trying to create a group chat or connection? I am not sure you can just share an id and add someone to a session?
21 Jan 2021 by Member 11996793
Gerry, I'm encountering the same issues. I don.t have an answer yet. There is very little info with no complete solutions on Google from Microsoft. There are also no modern books. It's all too bad because its a good concept. I almost have it...
18 Dec 2020 by Member 4764082
I have ASP.Net MVC application which is using SignalR to pass data to all connected client. I need to read out this data received on Client in English and Arabic. Client browser can be on iOS or Android or Windows PC. How can i solve this issue....
20 Nov 2020 by sasko1
Hi! I am trying to make simple chat app with signalR. I did signalR part and have working chat. Now i want to save chat messages to database. In order to save message i need to know id of current authentificated user but I found out that...
20 Nov 2020 by Richard Deeming
The Hub class[^] has a Context property[^] which returns the HubCallerContext[^]. You can get the authenticated user by looking at the HubCallerContext.User property[^].
5 Nov 2020 by Member 14652754
I am trying to create a server client environment with SignalR. I read a lot of information on the internet and also a lot on Stack Overflow but I am totaly stuck :( What I have tried: Here is what I did: I created a ASP.NET web application...
11 Sep 2020 by nortee
Hi, I am trying to connect an android phone via signalr core to a normal (net461) signalr web api. And it always just hangs on the last line as per below. hubConnection = new...
2 Sep 2020 by Member 14929601
I am building an application that closely resembles Google keep. The problem lies in the following scenario.(realtime sync) Consider a user visits my website on 2 devices i.e laptop and desktop. When he edits/adds/deletes any new Note then the...
2 Aug 2020 by Member 14876167
I need to create a page based on websocket for transfering data between visitors and between visitors and server (online auction). Process: The website is hosted on a shared server somewhere .... The website administrator opens his admin page on...
2 Aug 2020 by Member 14876167
I dropped SignalR and used the websockets directly in VB
31 Jul 2020 by TCS54321
i am implement a notification system when use insert any value in database using signalR and asp.net core. I am new in SignalR and asp.net core. i follow this article Create a push notification system with SignalR | DotNet - awesome[^] to...
31 Jul 2020 by Sandeep Mewara
Would suggest you to follow this article that explains step-by-step on how to use SignalR with ASP.NET core. Post that, make necessary changes if needed be. Refer: Get started with ASP.NET Core SignalR | Microsoft Docs[^]
27 Jul 2020 by Member 14891432
I'm writing a Xamarin app, targeting Android and iPhone. My app needs to communicate with a server to send and receive data. So far, I've concentrated mainly on the Android. I started with SignalR and spent a lot of time trying different things...
19 Jul 2020 by Sandeep Mewara
See with a working demo how SignalR works and how it can be used
4 Jul 2020 by Member 14876167
thank you for your answer ... I'm sure you all already went to this kind of situation : you're stacked with a project, you've been googling for 3 weeks in search of a solution . And then you decide you've been stupid enough not asking for help...
4 Jul 2020 by MadMyche
Microsoft does have tutorials for web pages using SignalR; go through them and learn how they work, and then work from there to get to where you need to be. Microsoft Docs: Get started with ASP.NET Core[^]OP: In my opinion, the solution is using...
18 Jun 2020 by User 14773238
After further investigation, it turns out the actual web listening was being hosted by the System process. As explained in answers to another question, apparently all HTTP listening winds up going through the System process. Setting the...
10 Jun 2020 by Member 13444435
Hello together, I hang unsuccessfully for days on this problem and not a single answer to different posts at different websites helped me so solve it. I`m working on a Windows 10 System and implementing with VisualStudio 2017. With AspNetCore I`ve implemented the following projects: 1.)...
10 Jun 2020 by rajesh2245977
Hi, Did you get any solution for this ? I am also facing similar issue on linux using docker. Regards, Rajesh
16 May 2020 by Garth J Lancaster
Well .. I wouldn't be using the FileSystemEventHandler OnChanged event to attempt to get every line/group of lines added - there's too much buffering etc going on, and have a look here FileSystemWatcher.Changed Event (System.IO) | Microsoft...
16 May 2020 by dreevo
I have a log file that I have to trace in real time with signalr. I'm using the mapping to remote method and FileSystemEventHandler approach as follow : This is the method that watches the log file. public void Progress_Log(SchemaUpdate...
12 May 2020 by mohamad_ali
hi i am using sqldependecy to get notify from sqlserver and use signalr for send alarm to some users that store in database before that i sent alarm for all user and use simple select but now i want using complex select What I have tried: ...
12 May 2020 by Richard Deeming
That query cannot be used with a SqlDependency: Creating a Query for Notification | Microsoft Docs[^]: Query notifications are supported for SELECT statements that meet the following requirements: … The statement must not contain subqueries… …...
12 May 2020 by mohamad_ali
I have some databases that work with single ASP.NET MVC project and all of the databases are the same and i used real time alarm with signalr but when i want to start sqldependencyin Application_Start method needed connection string, i set...
11 May 2020 by Richard Deeming
As the name suggests, the Application_Start event fires when the application starts. It doesn't run again until the application is restarted. It will also potentially run before any user has logged in, which would mean you wouldn't have a cookie...
23 Apr 2020 by Richard Deeming
The Javascript speech synthesis API works in all modern browsers: SpeechSynthesis - Web APIs | MDN[^] The supported languages will vary depending on the browser. For example, on my PC, Firefox only supports English, but Chrome (and by extension...
7 Apr 2020 by Vikas Sharma
Scrum poker app using ASP.NET Core SignalR 3.1 with React in Typescript
5 Apr 2020 by koklimabc
for working with getAllMessages() You need to create Web Api function by create a new Message.svc file under Root directory with below, [WebMethod] [WebInvoke(Method = "Get", ResponseFormat = WebMessageFormat.Json)] public...
5 Apr 2020 by kryptonita
I took an example https://github.com/venkatbaggu/signalrdatabasenotifications/tree/master/SignalRDbUpdates where SignalR is used with SQL Server. The example works perfectly, however, and in Asp.net MVC. I'm trying to follow the same example by...
5 Apr 2020 by koklimabc
under your NotificationHubs.cs, context.Clients.All.UpdateMessages(); Must change the small letter "u" to "U" In order to verify Signarl is whether working or not, you need check if setting is followed as bellow. under your...
31 Jan 2020 by SohaibX
Hello,I'm pretty new on SignalR, I've Self-Hosted a signalR at http://localhost:8080Let's say my computer's IP is 192.15.15.15. I Need my client to connect to this host, with IP Address like http://192.15.15.15/signalr but when I try to connect I get the errorBad Request - Invalid...
13 Nov 2019 by Anil K. Choudhary
Hey, There are multiple ways to add alerts through code please use below ARM Template. ARM Templates { "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "alertName": { ...
13 Nov 2019 by madhukrishnahere
Instead of creating alerts in every environment for Azure resources, need to add alerts for the following resource through ARM templates. API Management Service App Service SignalR Key Vault Azure Storage Cosmos DB Kubernetes Service What I have tried: I haven't found proper references for...
30 Oct 2019 by RickZeeland
I had a similar problem that strangely occurred on some computers: the first try fails and the second try works. Never found the cause but "solved" it by adding a retry. It also baffles me that there is so little information about these sort of Signal problems on the internet. You might be...
29 Oct 2019 by gan chee siang
Hi everyone, who can help me why cannot connect to server side from client side? keep showing "Response status code does not indicate success: 404 (not found)" What I have tried: startup.cs using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using...
3 Oct 2019 by Gerry Schmitz
Upload speed is always slower than download speed; as much as 10x slower. And you can't compare "local" traffic (SQL Server Express) with traffic over the internet. Particularly if you're handling multiple streams. If you've got some "slower" network cards, switches or hubs in the mix, that...
3 Oct 2019 by Михаил Матясов
Why is the data transfer speed from the server being cut during the stream? 12 minutes ago|LINK|95.79.163.30 There is an ASP. NET application running on a VPS server. (Channel width 200 mb \ s). It works as follows: data is transferred from the client to the server and immediately to the...
2 Sep 2019 by nortee
Hi, I am trying to host a windows service containing a signalr hub which has a custom port number (in my case 7777) on windows server 2019. However, the firewall is blocking my calling systems (.net clients) from calling the hub in the service at all. The network is the only place where this...
28 Aug 2019 by kedar001
In my application, file editing is done using a shared folder on server. but which is a security risk. is there any other way to edit Microsoft word file. or is there any way to upload file from downloaded folder or any temp folder from client machine without user interaction using any...
28 Aug 2019 by Afzaal Ahmad Zeeshan
Quote: file editing is done using a shared folder on server. but which is a security risk. It will be a security risk as long your users can edit the files anonymously. You must try requiring them to login before they can access the resources and suddenly this will be a beautiful feature in your...
6 Aug 2019 by patfr11
Hi, I have an MFC app that I need to connect to a SgnalR server written in C#. I don't find any example of SignalR client code in C++, everything is in C#. Could somebody help ? Thanks What I have tried: I have installed the Microsoft.AspNet.SignalR.Client.cpp.v1.40 as seen somewhere else but...
6 Aug 2019 by MadMyche
30 seconds of google found this: GitHub - SignalR/SignalR-Client-Cpp: C++ client for ASP.NET SignalR 2.x[^]
16 Jul 2019 by Mustafa Kok
SignalR server and client applications for demonstrating common scenarios like connecting, disconnecting, joining and leaving groups, sending messages to all clients, to specific or group of clients
29 May 2019 by 855
I created a signalr service on Azure. I'm trying to connect it from C# client. Below is the code sample i found, something i don't understand is when Azure SignalR already used(app.UseAzureSignalR), why map it to a local Hub(Chat)? will the Chat.cs be hosted on azure? startup.cs...
29 May 2019 by Gerry Schmitz
2 problems: 1) I "found" 2) I don't understand Quote: Below is the code sample i found, something i don't understand Quickstart to learn how to use Azure SignalR Service | Microsoft Docs[^]
16 May 2019 by Codes DeCodes
I am using signalR for notification i.e. when record is inserted in table, I have to inform user in my app as new notification. My code goes like this: I global.asax file in Application_start(): SqlDependency.Start(@"data source=DESKTOP-591MN5Q\SQLEXPRESS01;initial...
16 May 2019 by Codes DeCodes
I found the solution. Just in case if this solution will help someone else in future. No db owner existed so this issue was caused. I changes db owner and now every thing is working as required.
22 Apr 2019 by Sean2299
SignalR Simple Chat .container { background-color: #99CCFF; border: thick solid #808080; padding: 20px; margin: 20px; } ...
22 Apr 2019 by ZurdoDev
F-ES is correct. You need to load jquery first. $ undefined means it can't find the jquery library. Or maybe you are loading too many jqueries. You'll have to troubleshoot, as F-ES listed, to find out what exactly is causing it if you think you are loading it in the right order.
26 Mar 2019 by Member 13444435
Hi Richard, this does only eliminate some exceptions, but I still get the exception that the remote certificate isn`t valid. If I start the Web.AuthServer and afterwards only the Web.ApiServer everything is fine. But the Web.ApiServer tries to get a SignalR-Connection to Web.ApiSwitch and if...
26 Mar 2019 by Richard Deeming
If you want to use a self-signed certificate, then you'll need to bypass the certificate validation. There are several suggestions in this StackOverflow thread[^]. For example: using (var httpClientHandler = new HttpClientHandler()) { // NB: You should make this more robust by actually...
11 Mar 2019 by Sukhwinder Lagah
How to Show incoming Text Sms coming from Twilio api in asp.net mvc using signalR without refresh page What I have tried: I have tried .net with signalR and load content using jquery ajax
4 Mar 2019 by traci dukes
Hi, Can you share with me how you got the progress bar fixed to not display in a multi-user environment. I have been trying use clients.client(connectionId) to limit progress bar to current user but it is not working. Any help would be much appreciated. Thanks Traci Dukes What I have tried: ...
9 Oct 2018 by Member 13441472
please help me to implement chat functionality in my MVC 5 asp.net application. and client do not want to use signalR and any other third party frameworks. give me some ideas to implement or how can i start. thanku in advance What I have tried: i did't tried anything, i want to start from scratch
9 Oct 2018 by Vincent Maverick Durano
You would need to implement a JavaScript polling to ping your server within a given time. For example, you write a JavaScript function that performs an AJAX request to your server to fetch the data. You may need to use setInterval to ping your server every seconds. One example is this: ASP.NET...
7 Oct 2018 by F-ES Sitecore
I googled "asp.net chat application" and this was the first result https://pusher.com/tutorials/chat-aspnet/[^] I'm sure if you google yourself you'll find many more.
19 Sep 2018 by Member 13990481
I have two different web applications that need to transfer data between them. After reading about SignalR, I'd like to give this a try but I am not sure if its a good fit. The examples I found not really matches my requirements. I did not find much documentation on how to do this. Any advice on...
18 Sep 2018 by Altaf Ansari
SignalR Real-Time ChatApp with Emoji / Smiley and sending file attachment
11 Sep 2018 by Member 13769611
Here is the screenshot of runtime project that contains signalR. https://i.stack.imgur.com/hzzEo.png[^] There is no hubs file generated. I am getting the most common javascript error That is also shown in picture. Please advice something on this. The code is the sample code from microsoft...
11 Sep 2018 by Member 13769611
Finally got the answer. I was trying every possible thing I got on internet and then one thing worked. and that was in this line [HubName("myHub")].. I had this name as [HubName("MyHub")] before and so the error. [HubName("myHub")] public class MyHub : Hub { public void Send(string...
11 Aug 2018 by Arsenije Arsenijevic
I know the question is old, but I see it's not answered, just referenced to a working example. You're creating new SqlDependency objects on each call of the GetAllUsers method (which I presume is not called just once) and not stopping the old-ones. This results in multiple SqlDependency objects...
11 Aug 2018 by Member 11467752
I'm developing a notification system using SqlDependency and signalR, the problem I can't deal with is when I change the attribute value "IsOnline" in DB to True or False based on attendee status, OnChange event fires many times, first time a new user log in I get two notifications then the...
1 Aug 2018 by dsuryd
How to create a powerful reactive form on an ASP.NET Core Razor Page in MVVM style, with field configuration and validations written in C# and communicating with SignalR.
19 Jul 2018 by Vincent Maverick Durano
Quote: I'm pulling the data, but I can't print it Repeater. See if this will work for you: https://www.aspsnippets.com/Articles/Bind-Populate-Repeater-control-with-JSON-object-using-jQuery-AJAX-in-ASPNet.aspx Essentially, Data Representation Control such as Repeater is a Server Control....
19 Jul 2018 by Smthm
I can't pull the data into the Repeater. To use the data, I need to transfer it into the repeater, not the table. I've been calling online for days, but I haven't found an answer. What I have tried: $(function () { // Proxy created on the fly var job =...
13 Jul 2018 by Tony Girgenti
I can't say that I figured this out, but I did manage to get it to work by testing different coding strategies especially inspired from this article[^] by Dino Esposito. I created a button to "GetProducts" and modified the bottom "div" in the AccessToken.cshtml file like this:
13 Jul 2018 by Tony Girgenti
Hello, I have an Asp.Net Core 2.1, MVC Web application in Visual Studio 2017 15.7.5. I have been trying to figure out how to send a single SignalR string text message to an MVC View.cshtml from the controller method that is invoked from the MVC View using this type of link:...
17 Jun 2018 by Member 11933660
Using SignalR need display updated records without refresh page i tried using signalR not working depenedncy on change event please help on this What I have tried: using SignalRDbUpdates.Hubs; using System; using System.Collections.Generic; using System.Configuration; using System.Data;...
7 May 2018 by Herman<T>.Instance
Issue is solved. It was a caching thing in the browser...
7 May 2018 by Herman<T>.Instance
Hi Folks, in my asp.net website I have signalR installed and when an exception is recorded in the Errors Table of my MS SQL Server the SqlDependency is run, the error is received from the db, the ErrorHub sends the message to all context.Clients.all.... My page shows a pnael with the message...