signalr

SignalR what happens if user is inactive?

夙愿已清 提交于 2021-02-08 14:12:47
问题 I would like to know what will happen if the user is inactive. Imagine user connected to the hub, the connection is established, but user doesn't refresh the page or doesn't do anything for an hour ... will the connection be maintained anyway? And after that time can the message be pushed to him? 回答1: SignalR sends keep-alive messages which will keep the connection open even if there is no other activity (except for long-polling connections; in that case, the client will make its regular ajax

SignalR what happens if user is inactive?

放肆的年华 提交于 2021-02-08 14:10:06
问题 I would like to know what will happen if the user is inactive. Imagine user connected to the hub, the connection is established, but user doesn't refresh the page or doesn't do anything for an hour ... will the connection be maintained anyway? And after that time can the message be pushed to him? 回答1: SignalR sends keep-alive messages which will keep the connection open even if there is no other activity (except for long-polling connections; in that case, the client will make its regular ajax

passing userId in Hub of SignalR

允我心安 提交于 2021-02-08 11:15:42
问题 Greeting..!, I am making a asp.net chat webApplication using SignalR were I want to keep track of every user and store there actions is database. I use userId to keep track of them. My problem is that I don't want to pass confidential data(like userId) from client form to signalR hub.And I know SignalR hub class does not support sessions. so how can I do that. I am new to signalR and I googled a lot about this problem but couldn't find any simple answer. 回答1: SignalR supports different ways

passing userId in Hub of SignalR

左心房为你撑大大i 提交于 2021-02-08 11:14:07
问题 Greeting..!, I am making a asp.net chat webApplication using SignalR were I want to keep track of every user and store there actions is database. I use userId to keep track of them. My problem is that I don't want to pass confidential data(like userId) from client form to signalR hub.And I know SignalR hub class does not support sessions. so how can I do that. I am new to signalR and I googled a lot about this problem but couldn't find any simple answer. 回答1: SignalR supports different ways

SignalR - how to disable WebSockets (but keep other transports active)?

℡╲_俬逩灬. 提交于 2021-02-08 09:05:53
问题 In both a C# client and Web Client - how do I tell signalR - "Try everything but websockets"? I have the following in my web code: window.hubReady = $.connection.hub.start({ transport: 'longPolling' }); But this is just javascript and longpolling; I'm looking for the configuration for both JS and C# clients to only remove websockets as a transport. How can this be done? 回答1: On the server: public class Startup { public void Configuration(IAppBuilder app) { DisableWebSockets(GlobalHost

SignalR - how to disable WebSockets (but keep other transports active)?

夙愿已清 提交于 2021-02-08 09:03:44
问题 In both a C# client and Web Client - how do I tell signalR - "Try everything but websockets"? I have the following in my web code: window.hubReady = $.connection.hub.start({ transport: 'longPolling' }); But this is just javascript and longpolling; I'm looking for the configuration for both JS and C# clients to only remove websockets as a transport. How can this be done? 回答1: On the server: public class Startup { public void Configuration(IAppBuilder app) { DisableWebSockets(GlobalHost

通过SignalR技术整合即时通讯(IM)在.NET敏捷开发框架中落地

泪湿孤枕 提交于 2021-02-07 18:48:04
1、引言 **即时通讯(IM)**是RDIFramework.NET敏捷开发框架全新提供的一个基于Web的即时通讯、内部聊天沟通的工具。界面美观大方对于框架内部进行消息的沟通非常方便。基于RDIFramework.NET敏捷开发框架的即时通讯IM支持常规的用户对用户(点对点)聊天、工作流程流转的提醒、服务端消息的推送等。消息到达还有类似QQ的声音提醒,同时对消息进行了持久化处理,即时离线的用户,上线后也会收到消息,不会造成消息的丢失。还提供了很多扩展接口供用户实际扩展使用,非常的强大,方便。 通过“企业内部聊天IM”我们可以扩展很多应用出来。这儿特别说明的是我们的IM使用的是SignalR技术。.NET SignalR 是为.NET 开发人员提供的一个库,可以简化开发人员将实时 Web 功能添加到应用程序的过程。实时 Web 功能是指这样一种功能:当所连接的客户端变得可用时服务器代码可以立即向其推送内容,而不是让服务器等待客户端请求新的数据。什么是实时通信的Web呢?就是让客户端(Web页面)和服务器端可以互相通知消息及调用方法,当然这是实时操作的。SignalR提供了非常简单易用的高阶API,使服务器端可以单个或批量调用客户端上的JavaScript函数,并且非常方便地进行连接管理,例如客户端连接到服务器端,或断开连接,客户端分组,以及客户端授权,使用SignalR都非常

Asp .Net Core 2 + SignalR (1.0.0-alpha2-27025) + /signalr/negotiate 404 Error

陌路散爱 提交于 2021-02-07 14:15:40
问题 I add SignalR to ASP .Net Core 2 app packages "Microsoft.AspNetCore.All" Version="2.0.0" "Microsoft.AspNetCore.SignalR" Version="1.0.0-alpha2-27025" "Microsoft.AspNetCore.SignalR.Client" Version="1.0.0-alpha2-27025" "Microsoft.AspNetCore.SignalR.Client.Core" Version="1.0.0-alpha2-27025" "Microsoft.AspNetCore.SignalR.Common" Version="1.0.0-alpha2-27025" "Microsoft.AspNetCore.SignalR.Core" Version="1.0.0-alpha2-27025" public IServiceProvider ConfigureServices(IServiceCollection services) {

Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server

我与影子孤独终老i 提交于 2021-02-07 12:52:13
问题 I am using a console application for a server and my client is an angular 2 app. I get an error of Error: Failed to start the connection: Error: Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. I got my hub setup and my Startup.cs looks like this: public class Startup { public void Configuration(IAppBuilder app) { // Branch the pipeline here for requests that start with "/signalr" app.Map("/signalr", map => { /

SignalR connection handling on app pool recycle

Deadly 提交于 2021-02-07 11:57:14
问题 I'm using SignalR (0.5.3) Hubs for a chat app where each keystroke is sent to the server (saved in the DB), relayed to all clients and a return value (a string token of sorts) is sent back from the server. It works fine, until the app pool recycles, then it stops relaying the keystrokes to all the clients (because the in-memory server state is lost I suppose) and the server doesn't return back any values as well. At this point, I suppose all requests via SignalR are queued by IIS and then