Questions tagged [signalr-hub]

1

votes
0

answer
314

Views

Signalr hubconnection.Start not working

I m using SignalR but I have a problem. There is table called Discussion.when data insert, trigger call API service the codes in API service public async void Triger(int ID) { try { var hubConnection = new HubConnection('http://localhost:57278'); IHubProxy stockTickerHubProxy = hubConnection.Crea...
ömer şahin
1

votes
2

answer
1.6k

Views

Adding user to group in SignalR

When adding a new user to a group in my SignalR Hub, how do I check to see if the user has already been added to that particular group? Do I even need to worry about this? In my SignalR based chat app, there are multiple chat rooms and a user can participate in multiple rooms simultaneously. Every t...
Sam
1

votes
0

answer
255

Views

SignalR and PHP client using PHP's standard socket functions

Does someone know a good example or tutorial or PHP socketclient (using PHP's socket functions) to wait for updates from SignalR server? I would like to connect to socket.bittrex.com to receive updates. $socket = socket_create(AF_INET, SOCK_STREAM, 0) or die('Could not create socket\n'); $result = s...
Marcel Molenaar
1

votes
0

answer
387

Views

Uncaught TypeError: cannot read property 'chatHub' of undefined

I'm trying to create SignalR chat application, but I couldn't resolve this error: Uncaught TypeError: cannot read property 'chatHub' of undefined I have written my code below, please check. ChatHub.cs: using Microsoft.AspNet.SignalR; namespace SignalRMVC.Models { public class ChatHub : Hub { public...
1

votes
0

answer
62

Views

Asp.Net SignalR second tab does not fire onConnected event

I just created a sample project with signalR. I am just trying to test managing multiple connection. Everything works as expected when I open the first browser and load the page. It is going to fire the OnConnected event on the hub. But when I open another browser or different tab and load the page,...
ali
1

votes
0

answer
263

Views

SignalR dotnet core MVC Unit testing

and sorry for the confusing title! so, i am developing a 'lobby' where users come in, and other users can see when somebody logs in to the lobby. there can be many lobbies, but only when a user log in to the same lobby, they will show up. the solution and deployment works fine, my problem is (as the...
1

votes
1

answer
234

Views

Get HubContext from outside of Hub using Aspnetcore.signalr libray (not from Controller)

I am developing SignalR service using AspNetCore.SignalR. Following is my Hub: public class NotificationHub : Microsoft.AspNetCore.SignalR.Hub { public override async Task OnConnectedAsync() { await base.OnConnectedAsync(); } public override async Task OnDisconnectedAsync(Exception exception) { awai...
Sagar
1

votes
1

answer
117

Views

SignalR hub is shortlived

I have a self hosted webApi project in a desktop C# application. This uses Microsoft.Owin.Hosting.WebApp. I have a Hub derived class that has a send and a receive from an angular client. The hub is instanced by the WebApp.start. I find that it is short lived. When the client sends a message, the hu...
jeff
1

votes
0

answer
104

Views

SignalR gets Disconnected after 3 minutes and on reconnect after disconnect the process starts again from point zero

The scenario is i am sending 1000+ emails using sendgrid api. and i have used signalR for notifying the user how many emails have been delivered and how many has not while sending the emails. After three minutes the signalr connection gets disconnected. i get error Connection disconnected due to...
Sagar Tanti
1

votes
0

answer
49

Views

SignalR - Passing on a custom exception type in the OnIncomingError method

We currently have a module setup in SignalR for passing on our exception messages to the client, however, we would like to pass on the exception source as well. public class HubErrorMessageModule : HubPipelineModule { protected override void OnIncomingError(ExceptionContext exceptionContext, IHubInc...
Bobby Speirs
1

votes
0

answer
186

Views

ASP.NET MVC jquery 401 Unauthorized error with ASP authentication

ASP.NET MVC jquery 401 Unauthorized error with ASP authentication Hey, iam making fancy chat web app but i had 'little problem' with client reconnection after server is restarted. So i tried to update NuGet packages: Microsft.ASpNet.Signalr Microsoft.AspNet.SignalR.Core Microsoft.AspNet.SignalR.JS M...
Basyras
1

votes
0

answer
357

Views

Why is my SignalR-Application is so slow?

I have the following setup: Jquery v2.2.4 (Client) SignalR v2.3.0 (Server) ASP.NET C# MVC 4 I am now trying to use SignalR for Data-Transportation for huge data like ~3500-~5000 Key-Value-Pairs. These Pairs consists of an ID as Key and a long name as value. I am sending a request from my JS-Client t...
Snickbrack
1

votes
0

answer
57

Views

JIT SignalR Hub Sending and Receiving

Up till now for the past 3 months, I still have 0 clue how SignalR works at the JIT (Just-in-time) level. I'm trying to build a Hub that sends data to the client just in time, and the client will then receive the data and work along with it. EDIT: Incase you have no idea what I mean by JIT Sending a...
Nicholas
1

votes
0

answer
185

Views

SignalR save sender Id and receiver Id in ASP.NET MVC C#

I am following this Signal R tutorial from Microsoft. I have already configured everything for SignalR to be working and it does work. This is my Front End script to call SignalR $(function () { // Reference the auto-generated proxy for the hub. var chat = $.connection.chatHub; // Create a functio...
ev vk
1

votes
0

answer
80

Views

SignalR listener not getting invoked in React Native

I am building a mobile app in React Native for a backend written in .NET. The backend has implemented a realtime messaging service using SignalR Hubs. I am using the package react-native-signalr. The connection is getting established, and I can send message to SignalR hub by calling proxy.invoke. Th...
AmalaMP
1

votes
1

answer
59

Views

pass relative url in signalR hub connection

I am trying to implement signalR in angularJS, I want to pass relative url to hub connection, but it's making current url (on which my angular application is hosted) My API base url : http://localhost:81/NrsService/api/TestSignal My angular application running at http://localhost:81 Here is my sig...
Programmer
1

votes
0

answer
122

Views

How to pass data between client and server using SignalR?

I have developed a SignalR hub class to pass data through client and server. When Reservation controller Hit I had called ReservationHub.NotifyCurrentResertiovationToAllClients(); method and it worked fine but it doesn't effect in 'Driver view' through pickup partial view. Below mentioned my code. H...
prag
1

votes
1

answer
91

Views

Using SignalR with Web API to return completed tasks [closed]

I am looking to develop a web api / mvc application similar to how TripAdvisor works in that you can select a start and end date, and the page dynamically updates with the responses from different 3rd party APIs. Some APIs will respond within a second, whilst others might take 5 seconds. So as the...
neildt
1

votes
1

answer
39

Views

Workaround for lack of ConnectionSlow, Reconnecting and StateChanged events in SignalR Core?

I'm upgrading a project from SignalR to SignalR Core, and ran into the following issue. I don't see a way for the .NET client to quickly detect that it has been disconnected from the server. This happens when the web service recycles its application pool. It takes 90 seconds for the .NET Core client...
Eternal21
1

votes
1

answer
89

Views

Add headers to @aspnet/signalr Javascript client

I'm using @aspnet/signalr Official Javascript client from This npm package I wondering if there is the way to add Header configuration to the client connection header How I build the connection let connection = new signalR.HubConnectionBuilder() .withUrl( 'https://some.signalr-host.com' ) .build();
1

votes
0

answer
45

Views

Asp.Net SignalR Not working on load balancer with 2 instances (AWS ELB)

I have a SignalR application for real time support. This is hosted on AWS. It works fine, if environment has a load balancer with single instance. If increase instances to 2 under load balancer, SignlarR starts behaving intermittent. Broadcast few messages, lets says 4 out of 10 gets communicated ov...
Agam
1

votes
2

answer
30

Views

SignalR: puzzled by method names - CamelCase vs lowerCamelCase - what's the sense?

Could you tell me why names in Hub-classes are in CamelCase, but in client-side js-code it's in lowerCamelCase? And why I can't call Hello-method from MyHub-class just by MyHub.server.Hello? I mean it would be more clear to call the backend-methods be their exact c#-names, isn't it? Does that renami...
Alex Ilyin
1

votes
1

answer
1.8k

Views

SignalR returns error - Unexpected end when deserializing object

I have simple project, where I'm using signalR, When page loads, signalR scripts are loaded succefully, however right after that, call to http://localhost:24634/signalr/signalr/connect?transport=foreverFrame&connectionId=dca2db9c-b16a-4b96-96dc-9a6b187b6d9e&connectionData=[{'name':'notifier'}]&tid=...
Michael
1

votes
1

answer
1.5k

Views

SIgnalR iOS Client returning null for connectionId and protocol version

I'm trying to integrate an iOS app of mine to work with a MVC3 (framework 4) SignalR program that we have set up on a development server on our local network. The website that has been created for this works fine throughout our network. However when trying to use the SignalR iOS Client it gives the...
Mark Webb
1

votes
1

answer
3.1k

Views

SignalR IE9 Cross Domain request don't work

I'm making an application using SignalR. The Hub is placed on one server running Windows Server 2012 with IIS 8. http://mentor.cloudapp.net/mass/rexona/previa/signalr/hubs. The client is here: http://massdeveloperstage.com/Rexona/Site/colombia/Previa/Match?matchId=6F318A29-3400-444B-95D9-7EC41A7AD2D...
dnlgmzddr
1

votes
1

answer
447

Views

SignalR 0.5.3 and IIS 7.5

I have an application already deployed on a couple of customers utilizing signalr for communication. It works on windows 2003 server with IIS 6.0 with the mappings configuration, also works on win 7 and iis express. But for windows 2008 R2 with IIS 7.5 the hubs file although it's served, the signalr...
user1791567
1

votes
1

answer
903

Views

call controller action from signalR

Is there a way to call MVC controller action from signalR hub? I noticed that when doing that controller context is null. Is there a way to do it? or maybe another solution. thanks
ShaneKm
1

votes
2

answer
210

Views

'Hub' is an ambiguous reference

I'm using these libraries in my application: using SignalRDemo.Hubs; using Microsoft.AspNet.SignalR.Hubs; using System.Threading.Tasks; using System.Web.Script.Serialization; Now I have to implement IConnect, IDisconnect interface. So, I added using SignalR.Hubs; and added a function in my ChatHub...
Prateek Saini
1

votes
1

answer
1.7k

Views

Self hosted cross site connection issue with SignalR and Mono and Owin

I'm about ready to pull my hair out over this problem because all the guides show the same one or two solutions, which seem to be working for everyone but myself. I'm using SignalR in a Mono application, using Owin. I've set EnableCrossDomain = true in my HubConfiguration. I've set up a simple test...
Ben Baron
1

votes
1

answer
314

Views

Is it better to use multiple SignalR Hubs or setup a strategy pattern

From my understanding of the SignalR documentation, you can have 1..* hubs, but only one pipe is created b/t client/server. I assume multiple hubs is good for organization, so which is best - multiple hubs, or setup a strategy pattern with your main hub connection class that manages tasks (OnConnect...
ElHaix
1

votes
2

answer
980

Views

Group and send message to Client in static method

I have a class GroupManager, and during the process I would like to group people and send them a message from a static method, is it possible ? Here is my class GroupManager public class GroupManager: Hub { // The dictionnary contains private static Dictionary _reference { get; set; } private stati...
wytes
1

votes
1

answer
1.4k

Views

SignalR not working for remote connections

I am working on a site that uses signalr and it is working fine when i test it on my local machine but when a i try it remotely i cannot browse the mvc and when i try to send a request to signalar it just sits there waiting. here is my javascript code (i am using angularjs but all that code works fi...
Jake Rote
1

votes
1

answer
498

Views

Run method without binding it to event click event SignalR

As stated in the official SignalR sample: $(function () { var chat = $.connection.chatHub; chat.client.broadcastMessage = function (x) { console.log(x) }; $.connection.hub.start().done(function () { $('#button1').click(function(){ chat.server.send(x); }); }); }); it works perfect but, my question w...
InGeek
1

votes
1

answer
281

Views

Should we build our SignalR solution into a self hosted app or continue to use it directly within our MVC app?

We've currently got our SignalR 2.x Hub built directly into our MVC Web application. It basically works and now are thinking towards performance and scalability. In terms of performance and scalability, is it better to have our SignalR hub be self hosted in it's own app than be buit into the MVC a...
JohnB
1

votes
1

answer
1.6k

Views

SignalR disconnects and does not reconnect

Whenever my application gets reset, signalR disconnects but does not reconnect. I have a long running server task which sends updates to clients when each task is completed. // inside action executed on every completion of a task var h = new ForceHub(); h.MessageSent(email); above code stops sendi...
Sonic Soul
1

votes
1

answer
1.3k

Views

SignalR .NET client: subsequent method Invoke with same connection opened

I have a .NET client app, connected to a SignalR Hub hosted with a .net mvc5 webapp. The main routine of the client app does: int num1 = _myService.GetSomeHubMethod(); int num2 = _myService.GetSomeOtherHubMethod(); ... where _myService is an instance of the class: public class MyService { ... privat...
Alessandro
1

votes
1

answer
1.7k

Views

Client will not connect to local self-hosted SignalR server when using Internet Explorer 11

We have a self-hosted SignalR server (Windows application) that is running locally at http://localhost:8080. We also have a separate web site with a page that connects to the self-hosted SignalR server via a hub. When the web site is hosted on my local machine, the client connects to the SignalR s...
TKelsey
1

votes
1

answer
642

Views

SignalR-Hub after IIS stop,start will no longer call client functions

I have a queue system using SignalR 2.1.1 with Angular. Everything is working perfectly actually. However when I decided to test the system against an IIS outage I noticed a problem. When I stop, then start IIS, IIS restart doesn't cause the issue, my javascript functions that the hub calls will...
Crob
1

votes
1

answer
696

Views

When will “OnReconnected” occur?

If 'OnConnected' is raised when the 1st time we connect to our website, when will 'OnReconnected' happen? 1) Suppose someone is connected to the network and suddenly the network isn't available and soon it recovers, so OnReconnected happens? 2) Any other special that will make OnReconnted happen? Th...
xqMogvKW
1

votes
1

answer
7.8k

Views

SignalR: “Protocol error: Unknown transport.” when navigating to hub

I'm trying to use ASP.NET Signalr for the first time - here's what I've done: Created a new web project and added the following SignalR packages: I've then created the following class: [HubName('chat')] public class ChatHub : Hub { public void Hello() { Clients.All.hello(); } } And the following sta...
JensOlsen112

View additional questions