Questions tagged [signalr]

1

votes
2

answer
221

Views

SignalR connection via K8S Ingress

I'm trying to expose a SignalR hub hosted in a Kubernetes (Azure) pod. Basically, the authentication and the handshake steps work fine, but when I trigger some action, all clients connected via the k8s Ingress don't receive the message. Has anybody experienced this issue or just have shared SignalR...
Alvaro Cantador
1

votes
2

answer
1.5k

Views

synchronously invoke client side method with SignalR

SignalR does not have the ability to have client methods which returns a value. So I am trying to create a helper class to make this possible. So this is what I am trying to do: Server side: Call client method and provide unique request id Client(clientId).GetValue(requestId) Server side: Save reque...
hwcverwe
8

votes
1

answer
302

Views

How to catch ASP.NET Core 2 SignalR exceptions on server-side and handle them on client side with JavaScript?

Context: There are differences between ASP.NET SignalR and ASP.NET Core SignalR you can read here. As described in this stackoverflow post in ASP.NET SignalR you can catch unhandled exceptions on server side via the HubPipelineModule which not exists in ASP.NET Core SignalR. How can we catch unhand...
Simon
1

votes
2

answer
964

Views

Access SignalR Hub without Constructor Injection

With AspNetCore.SignalR (1.0.0 preview1-final) and AspNetCore.All (2.0.6), how can I invoke a method on a hub in server code that is not directly in a Controller and is in a class that cannot be made via Dependency Injection? Most examples assume the server code is in a Controller and should 'ask' f...
Glen Little
1

votes
3

answer
885

Views

.Net Core 2.1 - Read appsettings.json in javascript file

I have a Web application in .net Core 2.1 using signalR. I need to pass HubUrl into custom javascript file. Is that possible in .net Core? Sample of js code: const connection = new signalR.HubConnectionBuilder() .withUrl('http://localhost:5000/hub') //Here I need to read appSettings.json to get val...
k1dl3r
5

votes
0

answer
36

Views

Trying to add clients in a group inside SignalR but not working

When I try to work with groups in SignalR, I have something strange. I did a class for my hub where there's Task which works when I ping all clients. I have done Two methods wich one is to add and the second to remove clients from a group. But when I try to had a client inside a group, there's nothi...
thelittlewozniak
0

votes
0

answer
11

Views

Invoking SignalR Hub method from JavaScript client in a loop

I'm familiar with streaming data from an ASP.NET Core 2.2 SignalR Hub method to a JavaScript client. However, I'm wondering if you can do something that is sort of the opposite of that, and I've not found an answer yet. I have a large set of requests I'd like to make to a method on my C# SignalR Hub...
Jeff Dodson
0

votes
0

answer
5

Views

signalR - web socket connectionData: [] after connection start in ASP.Net MVC

My current application has an online voting process this was previously build feature using signalR older version - 1.1.4 & that online feature working perfectly in older version but later we did some .net version upgrade and we decide to upgrade signalR too. so we upgraded it to 2.0.3 to do this I...
TDM
1

votes
2

answer
289

Views

Azure SignalR Service with Asp.net 4.6

I have project in asp.net 4.6. I want to use Azure SignalR Service in my project as it is more efficient than backplane, but it seems like Azure SignalR Service are available for Asp.net core only. Is there a way to use Azure SignalR Service in asp.net 4.6 as well. Please suggest. Thanks
Tarlok Singh
1

votes
1

answer
1.3k

Views

Does SignalR have UDP protocol to communicate?

I have an application which uses SignalR and some how my clients can't connect to the application through TCP protocol. The question is what protocol SignalR uses for Hub Connection? if it's TCP then can i make it UDP protocol?
Sina
1

votes
1

answer
584

Views

SignalR 2 - Pending AJX requests after opening multiple tabs

I'm using SignalR 2 and I'm having problems when I open multiple tabs of the same page. After opening 4 or 5 tabs, all the requests get in pending status, like if I had exceeded the maximum allowed by the browser. If I close a few tabs, everything works again. Even with all the tabs opened, if I ope...
Francisco Goldenstein
1

votes
1

answer
471

Views

signalr self-host and static file server (e.g. owin.selfhost)

I have been 'too' succesfully with my stand-alone Singular web service. We would like to now remove the IIS server, which does little other than serve about 10 JS/HTML/CSS files. Node.JS has a static-files plugin, I looked and I saw that Katana, OWIN.SelfHost also has such a feature. http://odetoco...
Dr.YSG
1

votes
1

answer
1.6k

Views

How to send a message over a SignalR connection from Web API controller? [duplicate]

This question already has an answer here: calling SignalR hub from WebAPI controller issues 1 answer I see several examples such as this where the messages are sent from a hub using javascript. How can I send a message over this same connection from my c# code? Specifically, I hit a post method in...
user95227
1

votes
1

answer
237

Views

Does signalr create connection for each hub inside same app or all the hubs share same connection?

If the answer is each hub has its own connection , how expensive are really these connections, lets say we have 3 hubs for 30K user connected is there really a performance gain if I reduce them to one hub ?
sino
1

votes
1

answer
80

Views

SignalR ASP.NET

I have a problem receiving messages from an application because sometimes works but not always, and I have to F5 side to get back to work. Any ideas what could be? correct messages: [19:15:27 GMT+0100 (Środkowoeuropejski czas stand.)] SignalR: Invoking question.SendMessage jquery.signalR-2.2.0.min...
wroe12
1

votes
1

answer
796

Views

autofac with signalr no parameterless constructor defined for this object

I'm using autofac on my current Asp project and everything works fine until i decided to use dependancy injection in a signalR Hub here's my startup class public partial class Startup { public void Configuration(IAppBuilder app) { ConfigureAuth(app); var builder = new ContainerBuilder(); builder.Re...
Ahmed Ali
1

votes
1

answer
201

Views

Why are we checking context.connectionId when a recconect in signalR occurs?

As I know, The OnReconnected event handler in a SignalR Hub can execute directly after OnConnected but not after OnDisconnected for a given client. (source: http://www.asp.net/signalr/overview/guide-to-the-api/handling-connection-lifetime-events) So, if onReconnected will never be happened after onD...
Dato Maisuradze
1

votes
1

answer
550

Views

SignalR Backplane not creating tables with version 1.x

In my project SignalR is working fine. But due to introduction of load balancing in Web Farm, I am planning to use Backplane with SQL, following this article :http://www.asp.net/signalr/overview/performance/scaleout-with-sql-server . Backplane works fine if I use the latest packages(version 2.2.0) f...
Pramod Sharma
1

votes
2

answer
141

Views

Is SignalR suitable for getting result of a server side (background) processing?

I have a simple ASP.NET MVC web page in which the user uploads a file, in server side the file is processed, then some results must be displayed in the very same page. I've picked ajax upload (so no page reload done upon [Upload] button) which works fine. The controller's action method with the file...
g.pickardou
1

votes
1

answer
1.1k

Views

SignalR, JQuery and Node

In a project I'm currently working on, we are using Electron as a host. In the Electron main process, which is a normal Node process we need to connect to a downstream back-end that has SignalR endpoints. However, since SignalR is a JQuery module and neither SignalR nor JQuery are supported on Node...
Ray Booysen
1

votes
1

answer
2.5k

Views

Issue whille calling SignalR hub from WebAPI controller

I cannot figure out what is going wrong out here. I have created new project from the ASP.NET MVC WebAPI template.Added a new SignalR Hub to the project called MyHub. Added an HTML page that on load, connects to Hub and sends a message. HTML page has a button that when clicked will fire an ajax call...
Arayn
1

votes
1

answer
3.2k

Views

SignalR using Web API and Calling Service on other server

I have an application that makes calls from the client using JQuery to a Web API controllers, but then from such controller is makes a call to another server, where another controller picks up and does all the data logic (insertions, etc..) so basically (two different solutions and totally separate,...
mary_code
1

votes
1

answer
550

Views

Keep running one task every time Signalr Hub class is called

I want to monitor CPU performance on my ASP.NET MVC5 application and users are able to select the PC they want to be monitored. I use SignalR for monitoring real time CPU performance. It works well for first CPU, the problem is once user select another PC to be monitored, another new Task according...
Ali
1

votes
1

answer
2k

Views

signalr how i can i post a message from server to caller

I am using Signalr 1.1.4 because im still using .net4 so cant upgrade to signalr 2. Basically i want to post a message from the server to just the caller to avoid messages being sent to any client that did not start the process off. My hub class looks like this public class UpdateHub : Hub { ///...
Master Yoda
1

votes
1

answer
475

Views

Using SignalR and Nancyfx on Owin Selfhost || Angular2 on Clientside

I want to use SignalR and Nacyfx on my Service. So I tryed it with Owin Selfhost. I got my SignalR running and I can access it from my Angular2 Client and I can access my Client from SignalR, so everything seems to be fine with SignalR. But when im trying to access/recieve Data from Nancy I fail. I...
marvstar
1

votes
1

answer
83

Views

SignalR. Timer is not stopping on the server

We are using SignalR for information exchange. When the web browser is connected a timer starts, but it is not stopping when user close the browser. Here is the code. starttimer function runs when browser connected. When user disconnect the browser, timer still running on the server. [HubName('myC...
programer_1707
1

votes
2

answer
1.2k

Views

Accessing SignalR Hub in Web App from Windows Service

I've created a SignalR hub and have it working within my web app. Now I'm trying to get a separate Windows service to send a message to that hub. Depending on what I use for the hub connection URL, I get 401 Unauthorized, or a SocketException. What am I missing to get the Windows service to be able...
Bob Horn
1

votes
1

answer
87

Views

Continuous broadcasting with SignalR

I am currently broadcasting live scores for sports evens to the browser. This is currently achieved by running a continuous console application (Azure WebJob) to pick up data and broadcast it out. The current solution is quite simple. 2 threads. 1 retrieves from a database and adds to a shared colle...
pieperu
1

votes
1

answer
135

Views

SignalR intermittently stops when in Azure production slot

I have a web app in Azure that has 2 deployment slots. One slot is for development purposes; the other slot is for production purposes. I've made a SignalR hub (self hosted) into one of my controllers. Basically what this controller does is that it is responsible for recording records into my Azure...
Rahul Kishore
1

votes
1

answer
3.9k

Views

Decrypt Bearer Token in Web API

Is there a way to read/decrypt a bearer token in the web api project? My web api is also hosting SignalR hubs which are called from the browser via websocket. Unlike my normal api calls I cannot add the authorization header here. Though I can send the token in the query string and read this in the S...
Vince Black
1

votes
1

answer
33

Views

Updates in the server backend are not being published to the web client

I am creating a backend service that writes new articles into a database and, upon completion, publishes changes to listening client in the frontend layer. My problem is that these BE updates are not triggering my subscribers in the frontend layer. Directly testing the TaskHub (signalR backend asp.n...
Terje Nygård
1

votes
2

answer
543

Views

Signalr not working from controller, I assume it's not finding clients

I'm trying to broadcast a message from a controller. Basically what I'm trying to do is send a notification to everyone's dashboard whenever a specific object is saved. In my JS I have the connect method and I can send messages to the server and get messages back from it, so I know I'm connected to...
Taylor Mitchell
1

votes
1

answer
824

Views

Differences between signalr1 and signalr2

I do not find what is different between versions 1 and 2 of signalr. Is there a really value add to work with signal r 2? On nugget gallery, i only see signalr. There are no distinction to work even with version 1 or 2.
Bob5421
1

votes
1

answer
384

Views

Using SignalR for data update with AngularJS

I'm quite confused about SignalR. My problem is simple but I'm not sure how to handle it. I'm displaying some data into tables ( by calling web APIs using http.get the angular way ). Data itself is updated every X minutes ( cron job on server side ) and can be refreshed on button click ( client sid...
M.Michel
1

votes
1

answer
91

Views

Calling method of class in hub using SignalR

I have hub class with some methods, which are called by client without problems. But what to do, if I want to call method of class in hub's property, for example: Class MyHub Inherits Hub Sub HubMethod() End Sub Property SC As New SimpleClass End Class Class SimpleClass Sub DoNothing() End Sub End...
Ondřej
1

votes
1

answer
301

Views

Web API and SignalR - the correct way?

I am looking to start a project in which I need to make push updates from Web API. I found this post which gives an example of how to do this. Can I incorporate both SignalR and a RESTful API? http://bradwilson.typepad.com/blog/2012/07/webstack-of-love.html This demo uses a class called ApiControlle...
Ben Cameron
1

votes
1

answer
898

Views

Accessing localhost(Xamarin)

I want to implement chat in my android app using SignalR and I download this example from asp.net: https://www.asp.net/signalr/overview/getting-started/tutorial-getting-started-with-signalr But I can't acces to it using localhost through HubConnection. I tried using my IP adress and port number but...
Yupi
1

votes
1

answer
1.5k

Views

Can't get SignalR Hub variables to stop losing value (static variables not the issue)

I have a simple SignalR server, which I have almost no experience with. My hub class is: public class MyHub : Hub { public List players { get; set; } public MyHub() { players = new List(); } public void Searching(Player player) { players.Add(player); //Clients.All.a } } Here is where I call the Sea...
DaMuffiner
1

votes
1

answer
624

Views

Javascript call to a SignalR hub method doesn't return a value

I am writing a chat room page for my web site, and I've run into a bit of a snag. I want to be sure that the names being used by chat room participants are unique. The hub class itself contains a List of participants already taking part in the chat, so I added a method to the class to check for th...
Daniel Anderson
1

votes
1

answer
272

Views

SignalR- Pull Data from database iff at least one client is listening

Hello SignalR Experts, I have a requirement to create a live dashboard to display data chart pulled from the database.I am implementing the code as suggested in sitepoint blog (https://www.sitepoint.com/build-real-time-signalr-dashboard-angularjs/). It pulls data from server side as soon as the site...
WorkInProgress

View additional questions