signalr

SignalR with IIS 10 and ARR 3.0

流过昼夜 提交于 2019-12-08 10:04:50
问题 We can't get SignalR to work when using ARR 3.0 as a reverse proxy in front of our Visual Studio development machine. The connection is successfully established but the initial frame that should be sent from the SignalR server once the connection is established is never sent, as a matter of fact, no frames can be sent, this causes the client to drop the WebSocket connection. To sum up, "the websocket connection can establish, but can't transfer frames." The MVC app works without the reverse

Websocket not working in android app using phonegap

柔情痞子 提交于 2019-12-08 09:58:41
问题 I am trying to establish a websocket connection between my signalR server and an android app, built using the phonegap CLI. The javascript code runs on browsers on my PC but when I package it for android it fails to connect and gives the following error: Error during negotiation request Here is the javascript code - <!DOCTYPE html> <html> <head> <title>My New Application</title> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device

SignalR notification from server to client

本秂侑毒 提交于 2019-12-08 09:39:32
问题 I want to push a notification from my server to client. I've tried the chat tutorial found here but this just sends chat messages from one client to client What I want is a button whose onClick method is running at server. Once, I click this button, notifications (a string message) must be sent to all clients. My Hub class is public class NotificationsHub : Hub { public void SendNotification(string author, string message) { Clients.All.broadcastNotification(author, message); } } and in the

Connect to SignalR server in dotnet core from .NET client

一曲冷凌霜 提交于 2019-12-08 08:39:05
问题 I have a signalR server implemented in Dotnet Core 2.0, below is the code for the server Startup.cs public void ConfigureServices(IServiceCollection services) { services.AddMvc(); services.AddSignalR (); } public void Configure(IApplicationBuilder app, IHostingEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseMvc(); app.UseSignalR (routes => { routes.MapHub <NotificationsHub> ("notificationshub"); }); } NotificationsHub.cs public class NotificationsHub :

Using StructureMap for dependency injection to SignalR 2.0.1

ぃ、小莉子 提交于 2019-12-08 08:34:32
I'm trying to use StructureMap for dependency injection to a SignalR hub. Many sources in the internet say this should be done as in this answer: How do you Resolve signalR v2.0 with StructureMap v2.6 . I tried it, and got it to work - at least for the first action after the first pageload. When I try to leave the HTML page that includes the SignalR-JS-Code (or reload the page), or when I use one of the functions defined in my hub a second time, I get this StructureMapException: You cannot use the HttpContextLifecycle outside of a web request. Try the HybridLifecycle instead. in the public

How to buffer messages on signal hub and send them when the right client appears?

风格不统一 提交于 2019-12-08 07:52:45
问题 I hawe two type of clients connecting my signalR server (ASP.NET Core). Some of them are senders, and some of them are receivers. I need to route messages from senders to the receivers, which is not a problem, but when there is no receivers, I need to somehow buffer messages and not lose them (probably the best is ConcurrentQueue in some kind of a singleton class) but when the first receiver connect, the message buffer needs to start dequeue. Which is the best approach for this? I created

SignalR, Server side methods can be called, but client side methods cannot, only in production environment

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-08 07:48:29
I have successfully developed an hub for my newsletter sending function in a .net website. The server procedure is called by the hub, then during the sending routine, I send a client methods to report the progress status, and finally another client method to report ending of the routine. My dev environment is win10 with IIS 10, VS2013, .NET 4.5 SignalR 2.2.0. I can use websocket in my dev and work fine, but my production server is win 2008r2 (IIS 7.5), so I must use serverSentEvents, working as well on dev. Here my client code: $.connection.hub.logging = true; hubConn = $.connection

connet to asp.net core signalR server from a javascript client

谁说我不能喝 提交于 2019-12-08 07:00:33
问题 I have asp.net core web api server that is streaming a signalr, And it works for asp.net client , I am trying to make a connection with the code showen beelow but it only connects to a none core servers it wouldnt work for the core servers. //the hub class in the server code [EnableCors("AllowAllOrigins")] [HubName("LogNotifierHub")] public class LogNotifierHub : Hub { //methods defined here } startup code for the routing : app.UseSignalR(routes => { routes.MapHub<LogNotifierHub>("

Using SignalR on an asp.net Core app that targets the full .NET Framework

本秂侑毒 提交于 2019-12-08 06:40:56
问题 I have an existing ASP.net Core app that targets the full 4.6.1 .NET Framework instead of the .NETCore framework . I need to know: is there ANY way to use SignalR on such an app? Reading around the net I found some people claimning to have fount workarounds, but I cannot find any details on exactly HOW to do it. Any info on this subject is appreciated. 回答1: Well, after a lot of searching I found a sample project that implements this. You can find it here: https://github.com/jkells/signalr2

How do I update a Kendo scheduler from a SignalR hub method?

孤人 提交于 2019-12-08 06:19:31
问题 Here is the code using signalr, it successfully sends the information to the hub and the hub is just doing a clients.all.Notifiy etc etc..... I've just add the code sample that you recommedend, i doing this from the scheduler_change(e) so that on a single click it will insert the info that is returned from the hub.. for some reason the new booking does not show on the scheduler. function scheduler_change(e) { var start = e.start; //selection start date var end = e.end; //selection end date