signalr

What is the development status of SignalR 3?

℡╲_俬逩灬. 提交于 2019-12-18 14:18:32
问题 Based on my understanding, the old SignalR repository is dead: there were no commits for a year (ironically, the guys who previously committed to it, now commit to Node,js), dozens of issues without response (we experienced a bug and had to downgrade to a version that's two years old). There's a SignalR-Server repository which is a part of ASP.NET. It was supposed to be released with ASP.NET 5 (Q1 2016) but according to roadmap, it will be released later (Q3 2016). So I guess this is the

JWT authentication in SignalR (.NET Core) without passing token in Query String

北慕城南 提交于 2019-12-18 14:18:10
问题 I am using JWT authentication tokens in an ASP .NET Core Web API application. The tokens are generated by the API itself, not by a third party. I added SignalR sucessfully to the stack, but now I need to authenticate the users that are trying to execute server (Hub) methods. Someone suggested to pass the token in the "qs" property in JavaScript. This will not work for me as our tokens are really large (they contain lots of claims). I tried writing a custom middleware for reading the token

The On event on the SignalR Client Hub does not get called

柔情痞子 提交于 2019-12-18 14:14:38
问题 I seem to have an issue with SignalR's JS Client Hub. The problem is that the 'on' handler does not seem to work - it generates no error but doesn't receive any signals sent by the server. The code below shows an extract where I call the server (using the invoke) which works fine - then on the server I call back to acceptHubData which should be picked up on the client but isn't. My objective is when navigating to pages that each page will open a connection to a specific hub and releases this

SignalR 2.0 error: Could not load file or assembly Microsoft.Owin.Security

不羁岁月 提交于 2019-12-18 13:53:02
问题 I'm following this tutorial step by step http://www.asp.net/signalr/overview/signalr-20/getting-started-with-signalr-20/tutorial-signalr-20-self-host And I'm getting an exception on the line marked below string url = "http://localhost:8080"; using (WebApp.Start(url)) //<------ error on this line { Console.WriteLine("Server running on {0}", url); Console.ReadLine(); } Error message: Could not load file or assembly 'Microsoft.Owin.Security, Version=2.0.1.0, Culture=neutral, PublicKeyToken

How to handle SignalR server exception at client?

房东的猫 提交于 2019-12-18 13:27:08
问题 The error handler is added like this at client: $.connection.hub.url = "/signalr"; $.connection.hub.logging = true; $.connection.hub.error(function(error) { console.log('SignalrAdapter: ' + error); }); $.connection.hub.start().done(function() { me.onStartDone(); }); // ... At server it is: hubConfiguration.EnableDetailedErrors = true; Accordingly to the docs this should be enough. At my exception throwing it just displays a log text for it and does not invoke the handler: [18:18:19 GMT+0000()

Signalr doesn't call client side functions

落爺英雄遲暮 提交于 2019-12-18 13:00:49
问题 I'm using the VS2012 "Fall" Update with the Signalr 1.0.0 package. Calling server side functions works fine. However client functions are not called. Nothing seems to happen when onBroadcastMessage() (see below) is called. Questions: What am I missing? Is there a way to debug the client call? Thanks! Server code: using Microsoft.AspNet.SignalR; namespace KPMain { public class RealtimeConnectionHub : Hub { public void BroadcastMessage(string name, string message) { Clients.All

How do I call a SignalR hub method from the outside?

穿精又带淫゛_ 提交于 2019-12-18 12:16:44
问题 This is my Hub code: public class Pusher : Hub, IPusher { readonly IHubContext _hubContext = GlobalHost.ConnectionManager.GetHubContext<Pusher>(); public virtual Task PushToOtherInGroup(dynamic group, dynamic data) { return _hubContext.Clients.Group(group).GetData(data); } } I want call this method in another project with this code: var pusher = new Pusher.Pusher(); pusher.PushToOtherInGroup("Test", new {exchangeTypeId, price}); I want call PushToOtherInGroup ,when calling the method i don't

SignalR + Dependency Injection Questions

左心房为你撑大大i 提交于 2019-12-18 12:12:30
问题 I am using SignalR in my MVC3 application, and since I have implemented StructureMap Dependency Injection on my controllers I would like to do the same in my hub, but I can't seem to get it working. Please tell me what's wrong with my codes below: SignalRSmDependencyResolver.cs public class SignalRSmDependencyResolver : DefaultDependencyResolver { private IContainer _container; public SignalRSmDependencyResolver(IContainer container) { _container = container; } public override object

SignalR + Dependency Injection Questions

泪湿孤枕 提交于 2019-12-18 12:11:37
问题 I am using SignalR in my MVC3 application, and since I have implemented StructureMap Dependency Injection on my controllers I would like to do the same in my hub, but I can't seem to get it working. Please tell me what's wrong with my codes below: SignalRSmDependencyResolver.cs public class SignalRSmDependencyResolver : DefaultDependencyResolver { private IContainer _container; public SignalRSmDependencyResolver(IContainer container) { _container = container; } public override object

SignalR /signalr/hubs 404 Not Found

被刻印的时光 ゝ 提交于 2019-12-18 12:05:25
问题 I am trying to deploy a SignalR site on IIS. Code all works fine in VS. But getting the 404 not found error trying to resolve signalr/hubs so far I have tried. 1) Changing the Script ref to: script src="<%= ResolveUrl("~/signalr/hubs") %>" type="text/javascript"></script> 2) Modifying Web.Config to include : <system.webServer> <validation validateIntegratedModeConfiguration="false" /> <modules runAllManagedModulesForAllRequests="true"> </modules> </system.webServer> 3) Changing the invoke