Questions tagged [signalr.client]

0

votes
0

answer
3

Views

signalr core - how to call hub method from client

I'm adding SignalR to my app. I can send messages from server to client, but can't call hub methods from client. Here's my hub interface: public interface IGeneralHub { Task BroadcastMessage(HubMessage msg); //string type, string payload); Task JoinHub(List ids); } and hub client: public class Aucti...
Jamil
1

votes
2

answer
1.9k

Views

How to send the Group name on connected in SignalR Persisted Connection?

I have different groups of users to which i need to send data. I could have used hubs concept here but the only SignalR Android client library "SignalA" https://github.com/erizet/SignalA doesnt have implementation for hubs so i had to use Persisted Connections and its group concept. Now i see this O...
Bitsian
1

votes
1

answer
979

Views

Call specific clients in SignalR

I'm developing a SignalR application in which set of .NET console clients connecting to a web server. How can I call a specific client from the server using SignalR. In the current application I did, when I click button from the server side. It triggers all the Console clients. But what I want to t...
Nipuna
1

votes
1

answer
704

Views

Calling a client method from C# code in Generic Handler, SignalR

I've the following Hub: public class ImageHub : Hub { public void LoadTheImage(String id, String imageUrl) { Clients.All.loadReadyImage(id, imageUrl); } } And the following JavaScript code on the client side. $(function () { var loadImage = $.connection.imageHub; loadImage.client.loadReadyImage = fu...
user3332579
1

votes
2

answer
2.1k

Views

Explicitly set multiple transports in SignalR .Net client

Is it possible to explicity set two (or more) transports in the SignalR .Net Client? I can set a single transport using code such as: _hubCn.Start(new LongPollingTransport()); In the Javascript client it can be done using: connection.start({ transport: ['webSockets','longPolling'] }); However I have...
Jon Egerton
1

votes
3

answer
1.3k

Views

Is it possible to send a dictionary from server to c# client?

So I'm able to send simple objects like strings no problem. I'm also able to send the same dictionary to my javascript client. However, I can't seem to get my C# client to pick it up. I'm assuming this is because in the javascript client the type being sent doesn't need to be specified, but in C#...
Hardycore
1

votes
2

answer
1.3k

Views

SignalR Client HubConnection.Start() throws exception and doesn't keep trying to connect like the documentation says it should

When I call HubConnection.Start() to an endpoint that ISN'T UP AND RUNNING YET, I would expect that the HubConnection would do whatever it is that it's supposed to do to continually make the connection. At least I think that's what the SignalR client guide tells me: When you call the Start method i...
Dan
2

votes
1

answer
2.7k

Views

Best Practices for reconnecting a disconnected SignalR client (JS)

I'd like to improve the resilience of my clientside implementation of a signalR client. Currently, I do this: hub.server.sendClientNotification(string, appSettings.username()); However occasionally, an exception related to connectivity is thrown because either the server is not responding or the...
SB2055
2

votes
1

answer
155

Views

SignalR - Possible Values for Transport Method for a Connection on Client

I am just trying to find the values for the SignalR Transport method from the Client. I believe I can get the transport method via this javascript call: $.connection.hub.transport.name But I would like to use the value for some other logic so I need to know the potential values. And I couldn't find...
Jesse Sierks
17

votes
2

answer
7.4k

Views

SignalR: Hub OnConnected not called if no client methods

I am writing a game in SignalR. The idea is that you connect with your laptop, which will be used as "display" and then you connect with your smart phone and that will be used as "joystick". The entire setup works very well. Now that it all works, I decided to refactor the code. I realized that the...
pardahlman
1

votes
2

answer
1.4k

Views

Why does this work when I debug from Visual Studio but doesn't after I deploy to IIS?

Ok so this is really becoming frustrating and am hoping that someone can help me with this. I have just started going through some SignalR tutorials and all of that was working great. Then I decided to add an MVC Entity Framework model for some data access to my SignalR project so I could store name...
JosephN
17

votes
2

answer
12.1k

Views

it is possible to stream video with SignalR?

Well I'm trying to perform a proof about video streaming, I'm working with asp.net c#. I'm kind of lost, you have any idea or suggestion?
luis_laurent
18

votes
2

answer
15.6k

Views

SignalR authentication with webAPI Bearer Token

+i used this solution to implement Token Based Authentication using ASP.NET Web API 2, Owin, and Identity...which worked out excellently well. i used this other solution and this to implement signalR hubs authorization and authentication by passing the bearer token through a connection string, but s...
McKabue
1

votes
2

answer
641

Views

signalR MVC site loads indefinitely after signalR install [closed]

I created a brand new MVC4 app. Installed new signalR package from NuGet: Install-Package Microsoft.AspNet.SignalR –pre Whenever I run it, it loads indefinitely. I know it is caused by SignalR => App_Start/RegisterHubs that was added during install because it never gets passed "RouteTable.Routes.M...
ShaneKm
4

votes
1

answer
2.5k

Views

Connect to SignalR Hub after connection start

Let's say i have two or more hubs in my server application. My javascipt client (Angular SPA) initialy needs a connection to the first hub, and needs to subscribe to a method like this: connection = $.hubConnection(appSettings.serverPath); firstHubProxy = connection.createHubProxy('firstHub'); first...
Jeroen1984
2

votes
1

answer
102

Views

Adding Signalr version 2.2.0 nuget package raises error “Sequence contains more than one element” in UAP projects

With the Windows 10 Technical Preview tools, attempting adding the latest version of SignalR to Universal App Platform projects results in the error: "Sequence contains more than one element".
Jarem
1

votes
1

answer
1.1k

Views

SignalR System.InvalidOperationException: Buffer length exceeded

I've got a .NET client calling a method on a hub as follows: var competition = hubProxy.Invoke("GetCompetition", "Queen's Final 2013").Result; Debugging on Windows 8, I'm getting the following error: 20:23:25.0926734 - null - ChangeState(Disconnected, Connecting) 20:23:25.3748631 - ... - WS: ws://lo...
Tom Hunter
6

votes
2

answer
9.2k

Views

SignalR integration in android studio

I use signalR lib in my project. but I was not able to compile libs of https://github.com/SignalR/java-client on my own - I found them in internet. But it seems like there are not full (WebsocketTransport is missing) When I compile https://github.com/SignalR/java-client, i get two libs, and paste th...
Anton Kizema
1

votes
2

answer
4.2k

Views

Getting 401 Error with SignalR Owin Host 2.0.3

I am trying to setup a load test exercising as much of the code base as possible. I am running the server and client in the same process: class Program { class Startup { public void Configuration(IAppBuilder app) { app.MapSignalR(new HubConfiguration { EnableDetailedErrors = true }); } } public sta...
João Bragança
2

votes
1

answer
1.9k

Views

SignalR 2.2.0: client cannot call hub, hub doesn't get called

Everything was working and now it's not :) I keep looking through my source control, but I can't figure out what went wrong. I'm not getting errors and I'm having trouble finding out what's going wrong when debugging. The client command to call the hub gets called, but the hub never gets called. No...
4

votes
1

answer
3.9k

Views

different connection in Browser multiple tabs

Why SignalR is making different connection in browser multiple tabs for same logged-in user. Is there any way to make one connection for all tabs opened in same browser. From connection I mean connectionID of a user in SignalR.
Amna
3

votes
2

answer
1.1k

Views

SignalR 2.2 and ARR3.0 Load balancing

I am using signalr2.2 web application and hosted in IIS-8. Here I tried to implement load balancing for my application using ARR3.0. In my server farm I connected two servers and set the routing rule as 'weighted round robin'. Every server has a javascript client with HTML page. While I am access...
Suresh
2

votes
1

answer
718

Views

SignalR: Client and server both “reconnect” but pushes don't reach client

I have a C# SignalR client (2.2) and ASP.NET MVC SignalR server on Azure. When a new "Entity" is created on the server side, it pushes a simple notification to the client using the following: public static class EntityHubHelper { private static readonly IHubContext _hubContext = GlobalHost.Connectio...
c b
1

votes
1

answer
3k

Views

SignalR Long Running Process

I have setup a SignalR hub which has the following method: public void SomeFunction(int SomeID) { try { Thread.Sleep(600000); Clients.Caller.sendComplete("Complete"); } catch (Exception ex) { // Exception Handling } finally { // Some Actions } m_Logger.Trace("*****Trying To Exit*****"); } The issue...
sdtechguy
2

votes
1

answer
716

Views

how to use SignalR's round-tripping state?

According to the documentation of SignalR's Hub (https://github.com/SignalR/SignalR/wiki/Hubs) we can use something called "Round-tripping state". But I haven't figure out how to use on the .NET client side to use this feature. Could you give me a simple example to use that feature between a server...
soleiljy
2

votes
1

answer
3.1k

Views

Error sending object to .net signalr client

My understanding is that with signalr I can just send objects back and forth. I am trying to set up a .net client to receive notifications that orders have been placed on a web site. I am trying to set up a very simple example so that I understand the concepts. It works great when I am sending a str...
pcbliss
2

votes
1

answer
1.3k

Views

SignalR Client in Xamarin

I am trying to add the SignalR client to a Xamarin.Forms project. I see that there are 2 packages, one for .Net and the other for .NetCore Microsoft.AspNet.SignalR.Client and Microsoft.AspNetCore.SignalR.Client The project that I am adding it to is a .Net Standard 2 project But whenever I run the a...
2

votes
1

answer
410

Views

connection.closed is not a function SignalR

I'm confused about the closed event in SignalR. Apparently, there was some debate about what to call it e.g. onClosed(), closed(), etc. In my SignalR listener on the client side, I'm trying to implement this event but I keep getting an error that says it's not a function. I tried onClosed() and clos...
Sam
3

votes
1

answer
1.4k

Views

SignalR C# Client 407 Proxy Authentication Required

I'm trying to build a C# SignalR app (console app on the server, winforms app on the client), and it works great (in Visual Studio) when both the client and server are on the same PC, but when I deploy the server and repoint the client to the server, I'm getting a "407 Proxy Authentication Required"...
Mottster
2

votes
1

answer
279

Views

Unable to build SignalR.Android because of missing System.Net.Http

I'm trying to use SignalR in my MonoDroid project. So I downloaded DEV branch from https://github.com/SignalR/SignalR/tree/dev and when I open solution for Android, it is not possible to build it, because of missing System.Net.Http. All others dll are loaded correctly. I have this issue for MonoDroi...
avaxxx
2

votes
0

answer
738

Views

SignalR 2.0 for iOS not working

I am using a signalR library for iOS, called DyKnow/SignalR-ObjC: here is the git hub page. I am trying to update this library to SignalR 2.0 within my project, since the backend has been updated to signalR 2.0. I have finished updating AFNetworking to 2.0, since this is required for the new signa...
brenmcnamara
1

votes
1

answer
351

Views

Why I don't receive event on SignalR with complex object as parameters?

I have an event in SignalR that doesn't arrive while others that do arrive. Sending code: IHubContext _hubContext=... MyClass message1 = new MyClass (); MyClass message2 = new MyClass () { new MyMessage(Guid.NewGuid(), 0, 1), new MyMessage(Guid.NewGuid(), 1, 1) }; await _hubContext.Clients.All.Sen...
csharpwinphonexaml
12

votes
2

answer
12.9k

Views

SignalR “Error during negotiation request”

I have socket notification in my application which work great when I run locally, but when I deploy to my VM, it complains giving the following message. Error: Error during negotiation request. at Object.signalR._.error (jquery.signalR.js:178) at signalR.fn.signalR.start.onFailed (jquery.signalR.js:...
TheJediCowboy
2

votes
2

answer
633

Views

how do I create a message client as a singleton in angularjs

The workflow is something like this: user submits some kind of request server responds right away with a "yea, got your request, will work on it" user is informed that the server is working on it when the server finishes, it tells the signalr hub: hey i finished "this task" for "this guy" the hub fo...
ton.yeung
6

votes
4

answer
8k

Views

HttpClientException when connecting to working hub from SignalR .NET Client

I have a working SignalR application that allows me to connect multiple JavaScript clients and exchange data. When I tried to connect with a .NET client I get the following error: An exception of type 'Microsoft.AspNet.SignalR.Client.HttpClientException' occurred in mscorlib.dll but was not handled...
Darren
4

votes
2

answer
2.2k

Views

Android SignalR should be implemented as Service or IntentService?

On my Android App, I'm implementing SignalR connection (https://github.com/erizet/SignalA) to connect to a Hub server to send requests and receive responses. a sample of my code is as follows: signalAConnection = new com.zsoft.SignalA.Connection(Constants.getHubUrl(), this, new LongPollingTransport(...
Dv_MH
4

votes
1

answer
7.1k

Views

SignalR 2 long polling “protocol” request times out when not ran locally

Currently I have an app that is very chatty and needs to be supported by a Singleton(See Code below). I upgraded to SignalR 2.0 and I followed the upgrade guide, but after I deploy it out to an environment, sometimes all requests for every "protocol" fail, and signalr breaks, and when it doesn't bre...
Thomas Florin
3

votes
1

answer
4.8k

Views

Context is null in SignalR hub

I have a Web Forms application and testing to see how SignalR works for one of my requirement. My hub code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using Microsoft.AspNet.SignalR; namespace SignalRTest.Hubs { public class NotificationHub : Hub { public s...
WinFXGuy
3

votes
1

answer
105

Views

SignalR server updates vs. client interest in a subset of updates

In many of the examples I've seen, such as the StockTicker app, it's assumed that all clients would be interested in the updates to all stock prices... I'm trying to determine a best practice for when a client only cares about a subset of updates... Would I: broadcast all updates to all clients, and...
Novox
3

votes
1

answer
3.6k

Views

Handling exceptions in SignalR .Net client

I have the following client-side method (.Net client): public void CallServer() { try { _hubProxy.Invoke("SomeMethod"); } catch { } } Am I right in saying that this is asynchronous, in as much as it will return "immediately", rather than wait for the invoke to complete? If this is the case, would th...

View additional questions