signalr

Context is null in SignalR hub

巧了我就是萌 提交于 2019-12-07 07:27:15
问题 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 static readonly System.Timers.Timer _Timer = new System.Timers.Timer(); public NotificationHub() { var myInfo = Context.QueryString["myInfo"]; _Timer.Interval = 2000; _Timer.Elapsed += TimerElapsed;

Signalr backplane oracle

这一生的挚爱 提交于 2019-12-07 07:05:36
问题 Is it possible to setup a signalr backplane based on an oracle database? We have 2 servers which have a signalr hub. Clients can be connected to server A or to server B. When we send a message through the hub on server A we also want that the users on server B get that message. We don't use azure since it's a internal company site. No sql server or redis as well. Thanks. 回答1: Currently SignalR supports scale out by backplane only on , 1. Azure Service Bus 2. Redis 3. SQL Server see here :

SignalR - Broadcast to all clients except Caller

大城市里の小女人 提交于 2019-12-07 06:44:55
问题 Is there a way to send a message to all connected clients except the client that is sending the message. 回答1: In 2014 you can select clients with Hubs. The Others property publishes to all clients except the calling client. Clients.Others.addContosoChatMessageToPage(name, message); 回答2: Not yet, the only thing you can do today is filter on the client side. 来源: https://stackoverflow.com/questions/11155008/signalr-broadcast-to-all-clients-except-caller

SignalR - Forever Frame in IE stops working after a few minutes of being idle

筅森魡賤 提交于 2019-12-07 06:41:43
问题 I am using SignalR in IE9 and, unfortunately, it has to degrade to using the forever frame connection. I have spent some time looking at this with the Developer Tools in IE. I can see the callbacks loading into the dynamically inserted IFrame, and they call the receive function in the SignalR plugin. However after about 20/30 of these it just stops responding - I can no longer call client script from the server. I'm guessing that the IFrame load is finally timing out, but there appear to be

Max limit of message in SignalR

我怕爱的太早我们不能终老 提交于 2019-12-07 06:38:52
问题 I am trying to send notifications through SignalR. It works perfectly. But, does, anyone know what is the max size message we can send through SignalR. Does it have any official limit as such. Thanks 回答1: https://github.com/SignalR/SignalR/issues/1205 It's recommended to keep below 32K/message 回答2: it's 64kb. if you want to send more than that from client to server than use another tool. 来源: https://stackoverflow.com/questions/18012863/max-limit-of-message-in-signalr

CORS policy issue with angular 7 and ASP.NET core 2.2 using SIGNAL R

Deadly 提交于 2019-12-07 06:04:35
问题 My friend and I are running into CORS trouble with our API and angular client. We are trying to establish a link, we are using signalR and the client(Angular 7) registers himself to receive messages from server(ASP .NET core 2.2). In the browser console, I'm receiving this message : Access to XMLHttpRequest at 'https://ourEndpoint/CoordinatorHub/negotiate' from origin 'http://localhost:4200' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The

calling the Caller method in SignalR hub outside the hub context

故事扮演 提交于 2019-12-07 05:36:15
问题 I have a question in my mind about the Caller method of SignalR. In the hub method we can call a client side function like this. Clients.Caller.addContosoChatMessageToPage(name, message); but when i use to call it from outside the hub context it is not found or not implemented?? like this.. var context = GlobalHost.ConnectionManager.GetHubContext<MyHub>(); context.Clients.Caller.reportProgress(recordCount,totalCount); Can someone enlighten me in this part or is there other way to implement it

SignalR cross domain not working on browsers other than IE10

瘦欲@ 提交于 2019-12-07 04:10:25
问题 I am writing a web app using SignalR cross domain communication. I am using the latest version of SignalR, 1.0.1. Following is the code in the jQuery's document ready event: var connection = $.hubConnection(url); var proxy = connection.createHubProxy(hubName); connection.start().done(function () { proxy.invoke('serverMethod'); }); I tried running the application on Opera, Firefox, Chrome and IE 10. My OS is Windows 7. It works well on IE 10 and doesn't work on other browsers. I changed mode

Testing SignalR App in IIS Express

只愿长相守 提交于 2019-12-07 03:30:18
问题 Hello everyone I am using visual Studio 2012 and Developed a simple application for vetting purposes only However I am stuck because when I try to preview the application, I get the Following Error Message [PlatformNotSupportedException: This operation requires IIS integrated pipeline mode.] System.Web.HttpResponse.get_Headers() +9681446 System.Web.HttpResponseWrapper.get_Headers() +9 Microsoft.Owin.Host.SystemWeb.OwinCallContext.CreateEnvironment() +309 Microsoft.Owin.Host.SystemWeb

Accepting ASP.NET Forms Authentication cookies in an OWIN-hosted SignalR implementation?

点点圈 提交于 2019-12-07 03:28:56
问题 I've got an self-hosted SignalR instance, using OWIN. I'd like to implement authorization. My users will already have logged into an ASP.NET MVC application, using Forms Authentication. Since the two applications will be available at the same URL, the cookies will be shared between the two. How do I accept a Forms Authentication cookie in a self-hosted SignalR application? Clarification: I'm talking about a browser accessing a self-hosted SignalR hub using the same credentials that were used