signalr-2

How to hook up SignalR with an Angular 7 application

余生颓废 提交于 2019-12-04 20:07:56
问题 I simply cannot figure out how to make a signalr connection from Angular. Using the following tutorial at https://docs.microsoft.com/en-us/aspnet/signalr/overview/getting-started/tutorial-getting-started-with-signalr-and-mvc I've added a new SignalR 2.4.0 project to an existing .Net 4.6 solution in vs2017. I also have an Angular 7 application to which I've added the SignalR package via npm install @aspnet/signalr Now I'm trying to hook up a simple connection between client and server, but can

SignalR Websocket Exception when closing client

拈花ヽ惹草 提交于 2019-12-04 03:05:10
When starting and stopping a SignalR client that is connected to a basic self hosted server like this: async public void Start(string url) { _connection = new HubConnection(url); _proxy = _connection.CreateHubProxy("hubname"); await _connection.Start().ContinueWith((task) => IsRunning = true); } public void Stop() { _connection.Stop(); } I get the following exception when calling the "Stop" method (including trace messages): SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(c75fe282-a86d-406a-935b-5981b47bd472) SignalR.Transports.TransportHeartBeat Information: 0 : Connection

How to hook up SignalR with an Angular 7 application

ε祈祈猫儿з 提交于 2019-12-03 12:56:49
I simply cannot figure out how to make a signalr connection from Angular. Using the following tutorial at https://docs.microsoft.com/en-us/aspnet/signalr/overview/getting-started/tutorial-getting-started-with-signalr-and-mvc I've added a new SignalR 2.4.0 project to an existing .Net 4.6 solution in vs2017. I also have an Angular 7 application to which I've added the SignalR package via npm install @aspnet/signalr Now I'm trying to hook up a simple connection between client and server, but can't figure out how to establish the initial connection. My front end keeps throwing an exception: core

Angular SignalR Error during negotiation request

浪尽此生 提交于 2019-12-02 13:51:28
We are trying to use SignalR with Angular 2 and TypeScript. It seems my client side code is not working, especially Establish a connection (without the generated proxy) I Followed Angular 2 TypeScript using SignalR but I didnt include SignalR/Hubs script path as I want to with out auto generated proxy as I don't see any auto generated proxy classes created for me. Also referred SignalR documentation written code using Javascript We use windows authentication and Visual Studio 2015 , Windows 7, IIS Express I get this error Error during negotiation request. Hub Class public class

Angular SignalR Error during negotiation request

天涯浪子 提交于 2019-12-02 12:19:28
问题 We are trying to use SignalR with Angular 2 and TypeScript. It seems my client side code is not working, especially Establish a connection (without the generated proxy) I Followed Angular 2 TypeScript using SignalR but I didnt include SignalR/Hubs script path as I want to with out auto generated proxy as I don't see any auto generated proxy classes created for me. Also referred SignalR documentation written code using Javascript We use windows authentication and Visual Studio 2015 , Windows 7

Group Chat Signal R with Web API

六月ゝ 毕业季﹏ 提交于 2019-11-29 16:52:37
Below i have three table which is used for GroupChat,Firstly I am creating the group its all data wil be inserted into GroupTable,then on success of groupCreation i am calling insertConnectionId function which will call the MapGroupConnectionId on backend which generate the SignalR connection ID and insert into GroupTable using groupId and groupCreaterId, its working fine and i have Group Friends Table which consist of Friends ID,Now when any friend sent message to particular Group, i need to send the Message to all who are in that Particular Group through SignalR, i thought, i ll assign the

Best practice for reconnecting SignalR 2.0 .NET client to server hub

喜夏-厌秋 提交于 2019-11-28 02:48:17
I'm using SignalR 2.0 with the .NET client in a mobile application which needs to handle various types of disconnects. Sometimes the SignalR client reconnects automatically - and sometimes it has to be reconnected directly by calling HubConnection.Start() again. Since SignalR magically auto-reconnects some of the time, I'm wondering if I'm missing a feature or config setting? What's the best way to set up a client that reconnects automatically? I've seen javascript examples that handle the Closed() event and then Connect after a n-seconds. Is there any recommended approach? I've read the

Best practice for reconnecting SignalR 2.0 .NET client to server hub

前提是你 提交于 2019-11-27 04:58:16
问题 I'm using SignalR 2.0 with the .NET client in a mobile application which needs to handle various types of disconnects. Sometimes the SignalR client reconnects automatically - and sometimes it has to be reconnected directly by calling HubConnection.Start() again. Since SignalR magically auto-reconnects some of the time, I'm wondering if I'm missing a feature or config setting? What's the best way to set up a client that reconnects automatically? I've seen javascript examples that handle the