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
3
votes
1 answer

Blazor WebSocket closed with status code 1006

I have made a Blazor app, which is working well locally. When I put it on the server, quite often (when app uses DB context) I get this error : Error: Connection disconnected with error 'Error: WebSocket closed with status code: 1006 () The user…
Filip
  • 117
  • 2
  • 8
3
votes
1 answer

SignalR Hub Connection Error With Flutter

I am unable to invoke my hub method in my asp.net core backend , this is my CommentHub in flutter: import 'package:signalr_client/signalr_client.dart'; import 'package:logging/logging.dart'; import 'package:xperience/models/global.dart'; final…
DCodes
  • 789
  • 1
  • 11
  • 27
3
votes
0 answers

How to log or dump raw JSON messages with SignalR - Protocol JSON (Hub)?

How to get dump of all messages (raw payload) that are traveling between client <> server ? I tried to configure logging verbosity for following namespaces, without any…
Mitja Gustin
  • 1,723
  • 13
  • 17
3
votes
0 answers

Promise in UseEffect Umount

I'm trying to stop a SignalR connection when a hook unmounts. The stop function is a Promise which needs to be resolved before the hook unmounts. useEffect(() => { connection.start(); return () => { connection.stop(); // Promise }; },…
judehall
  • 884
  • 12
  • 27
3
votes
1 answer

Sending message to Group isn't working in Azure SignalR

I am working on Azure SignalR with Azure Functions. The broadcast scenario is working perfectly fine; however, sending message to a group isn't working. Following is the code on Azure Functions side: Following is the negotiate…
Saad Nawaz
  • 221
  • 1
  • 9
3
votes
1 answer

The CORS error occurred on SignalR negotiation phase

I have the following error in Console after migration from Asp.net core 2.2 to 3.1 Access to XMLHttpRequest at 'someuri/negotiate?negotiateVersion=1' from origin 'http://localhost:4208' has been blocked by CORS policy: No…
Vladyslav Furdak
  • 1,765
  • 2
  • 22
  • 46
3
votes
1 answer

Instantiating IHubContext in ASP.NET Core

I am using SignalR on different places of my web project. In my Controllers and HostedService this seems to be working fine. Clients instantiate connections with my hub and I can communicate with them back using an IHubContext instance, injected in…
mh133
  • 135
  • 12
3
votes
2 answers

SignalR receives more and more messages after refreshing the page

I wrote a web application in ASP.NET that exchange data with a C# program via SignalR. Here the relevant parts of my code. Of course if I forgot something important to address my issue, please ask in the comments. ASP.NET HubClientManager.cs using…
Mark
  • 4,338
  • 7
  • 58
  • 120
3
votes
2 answers

how to run StartAsync connection of signalr blazor client in docker image?

I created default blazor server side app. Then added Microsoft.AspNetCore.SignalR.Client and ChatHub class. Then edited startup.cs file (add services.AddSignalR() and endpoints.MapHub("/chatHub")) and index.razor page. Then run by IIS…
batbayar
  • 83
  • 8
3
votes
2 answers

SignalR client not working after update to core 3.1

We recently did an update of our code on the server side to asp.net core 3.1. Now there is a problem with the java-script client for signalr (@microsoft/signalr 3.1.0). I get the following errors: The code for the hub initialization: The access…
3
votes
2 answers

How to enable CORS on AZURE application gateway

how can I enable CORS on the Azure application gateway ? I have a signalhub running on Azure kubernetes service as a Dapr app. The app has All .net cors policies setup correctly, issue seems to be from the JavaScript to the gateway.
3
votes
3 answers

Angular 8 - showing a loading spinner only within the component

I am building a SPA where the homepage will include multiple components. I would like to have a loading spinner for each components, without an overlay and only showing within the component. I have implemented ng-http-loader 6.0.1, but it created an…
3
votes
1 answer

Connect React Native App to Net Core SignalR Hub

I'm developing a react netive mobile app that needs to implements a chat. The backend api are developed in .net Core 3.0, so I decided to create a SignalR Hub (Microsoft.AspNetCore.SignalR) and use it for real time messages. On the client I…
scotch
  • 171
  • 3
  • 14
3
votes
1 answer

IApplicaionBuilder dos not contain a definition MapSignalR(). app.MapSignalR() not workin on ASP.NET CORE

I want to incorporate SignalR on my project but I can't I have an error when I add the line app.MapSignalR() in the Startup class. Here is the StartUp class: public class Startup { public Startup(IConfiguration configuration{...} public…
Teresa Alves
  • 483
  • 1
  • 7
  • 16
3
votes
0 answers

Handle SignalR Exceptions in Middleware in .Net Core 2.2 Web API Project

I'm Working on the .Net Core 2.2 Web API Project. I have handled thrown exceptions by creating Middleware by referring this post Startup.cs app.UseMiddleware(typeof(ExceptionHandleMiddleware)); I'm catching exceptions thrown from catch like…
Sushant Yelpale
  • 860
  • 6
  • 19
1 2 3
99
100