signalr

How can I transfer bytes in chunks to clients?

情到浓时终转凉″ 提交于 2020-01-02 03:55:07
问题 SignalR loses many messages when I transfer chunks of bytes from client over server to client (or client to server; or server to client). I read the file into a stream and sent it over a hub or persistent connection to other client. This runs very fast, but there are always messages dropped or lost. How can I transfer large files (in chunks or not) from client to client without losing messages? 回答1: As @dfowler points out, it's not the right technology for the job. What I would recommend

SignalR cannot connect to Azure Redis on SSL

99封情书 提交于 2020-01-02 03:40:07
问题 I am currently hosting my redis cache server on Azure, and have signalR relying on it as the backbone using the following... GlobalHost.DependencyResolver.UseRedis("Server",port,"password","eventKey"); This works find on port 6379 (non-SSL) but my chat app breaks when I try to connect to the SSL port (6380) of my Azure Redis server, and the hub is never started. What could be the cause of this issue? Or am I doing something wrong? This is the error that appears on /signalr/connect in my

Get full URL inside SignalR hub

感情迁移 提交于 2020-01-02 01:43:05
问题 I'm developing an user tracking solution using SignalR, as a fun project to learn SignalR, for ASP.NET MVC applications. Currently i can track logged users and how long are they on a specific page. If they move to another page i track that also and the timer that SignalR is updating resets... Many other features are implemented or partially implemented. The problem i'm facing is how to get the full url Controller/Action/Parameters inside SignalR hub? When i use HttpContext.Current.Request.Url

SignalIR and KnockoutJS in Asp.Net Web Form

主宰稳场 提交于 2020-01-01 17:10:12
问题 I seen may samples of SignalIR and KnockoutJS samples on MVC platform but not on WebForm. Please suggest me, can we use on WebForm? Any articles link would be appreciable. 回答1: I know this is exactly a month late but here's a quick example [this is a trivial example that i have built from exploring MVC examples] lets say u have a page called MyPage in the .aspx file write the following: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="MyPage.aspx.cs" Inherits="MyPage" %> <!DOCTYPE html

Angular : Unable to pass API url in SignalR HubConnection

偶尔善良 提交于 2020-01-01 11:49:28
问题 I have developed a project in Angular6. There is a requirement to develop section for live chat. For that I am using SignalR in my asp.net core Web Apiproject. Now I want to use this Web Api reference in my Angular project. I am using this link. But while providing the Web Api url in App.Component.ts, I am getting below error : Constructor of class 'HubConnection' is private and only accessible within the class declaration. App Component.ts : import { HubConnection } from '@aspnet/signalr';

SignalR client doesn't work inside AngularJs controller

倾然丶 夕夏残阳落幕 提交于 2020-01-01 10:52:45
问题 I've created Angular application based on routes. Without using the routes, the Signalr works fine, but when I work with routes, the Signalr works just in one way - from client side to server. <html ng-app="SignalR"> <head> //Scripts <script src="~/signalr/hubs"></script> </head> <body> <a href="#/Today">Today</a> <a href="#/History">History</a> <div ng-view> </div> <script type="text/javascript"> var hubConnetion = undefined; hubConnetion = $.connection.hubs; $.connection.hub.start(); var

Using SignalR Core to send messages from a Controller Method to Angular

。_饼干妹妹 提交于 2020-01-01 09:55:11
问题 I'm trying to use SignalR for Asp Net Core 2.1 in order to send a message from a controller method which call is triggered from a test button in Angular. The behavior I'd expect is that when I click the button, my service invokes the controller method, which sends the test message. Then, I will simply log the message. I want to manage this in a service in order to avoid code duplication in all of the components. I've read some examples like this question about using SignalR in a service (I've

SignalR in ASP.NET Core behind Nginx

被刻印的时光 ゝ 提交于 2020-01-01 08:45:34
问题 I have a server with ubuntu 16.04, kestrel and nginx as a proxy server that redirects to localhost where my app is. And my app is on Asp.Net Core 2. I'm trying to add push notifications and using SignalR core. On localhost everything is working well, and on a free hosting with iis and windows as well. But when I deploy my app on the linux server I have an error: signalr-clientES5-1.0.0-alpha2-final.min.js?v=kyX7znyB8Ce8zvId4sE1UkSsjqo9gtcsZb9yeE7Ha10:1 WebSocket connection to 'ws://devportal

HubConnection could not be loaded from SignalR Assembly in Raspberry Pi Mono Project

感情迁移 提交于 2020-01-01 07:16:11
问题 I am trying to build a project in Raspberry Pi which communicates with my Azure server via Signalr. I have used SignalR in .NET client side in a mono project while working on a Xamarin project and was successful. For the test purpose, I have written a small block of code. using System; using Microsoft.AspNet.SignalR.Client; namespace testSignalr1 { class Program { static void Main() { var hubConnection = new HubConnection("******"); var serverHub = hubConnection.CreateHubProxy("HubTest");

.NET Signalr MapConnection is Obsolete?

我与影子孤独终老i 提交于 2020-01-01 04:44:20
问题 I am new to .Net and SignalR. I am looking at some code written by a former coworker and he added this line to the Route Config which is now throwing errors saying its obsolete but all the documentation I have read suggest mapping connections in this way. namespace FailureInvestigationToolbox { public class RouteConfig { public static void RegisterRoutes( RouteCollection routes ) { routes.IgnoreRoute( "{resource}.axd/{*pathInfo}" ); routes.MapRoute( name :"Default", url :"{controller}/{action