signalr

client constantly reconnecting

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-29 06:29:10
问题 My .net application which connects to signalr hub is constantly reconnecting. This problem only occurs on certain other corporate networks which makes me believe something is being blocked. I've tried to use the jabbr.net website from the same network and this doesn't work either (in chrome). How can i trace/fix this issue? 回答1: I think you're experiencing this issue https://github.com/SignalR/SignalR/pull/1553. We're working on a fix for it. The issue happens when the server sent events

SignalR: how to survive accidental page refresh

一个人想着一个人 提交于 2019-12-29 06:27:07
问题 Imagine there is a chat web app between two browser clients using SignalR. What is the best approach to survive accidental F5 hit done by one of the client? Here is described the strategy using cookies together with custom SignalR IConnectionIdFactory. But the author of the article says "The SignalR team doesn’t recommend this action" . So what is the recommended architecture? 回答1: You can map the temporary connection id to a permanent user id/name (which might be stored in your DB) when the

Cannot find the object “QueryNotificationErrorsQueue” because it does not exist or you do not have permissions

坚强是说给别人听的谎言 提交于 2019-12-28 06:55:28
问题 I am using SqlDependecy with signalR to push notifications to client browser when there is some database changes, I followed this and this post and everything works fine in local SqlExpress version 11.0 with Local Connection String , but i have some kind of permissions problem when i connect to remote database hosted in GoDaddy with Production Connection String Working Local ConnectionString <!--<add name="NotifyConnection" providerName="System.Data.SqlClient" connectionString= "Data Source=.

Using Simple Injector with SignalR

…衆ロ難τιáo~ 提交于 2019-12-28 04:49:18
问题 I thought using my own IoC would be pretty straight forward with SignalR and maybe it is; most likely I'm doing something wrong. Here's my code I have so far: private static void InitializeContainer(Container container) { container.Register<IMongoHelper<UserDocument>, MongoHelper<UserDocument>>(); // ... registrations like about and then: var resolver = new SimpleInjectorResolver(container); GlobalHost.DependencyResolver = resolver; } and then my class: public class SimpleInjectorResolver :

《ASP.NET SignalR系列》第四课 SignalR自托管(不用IIS)

为君一笑 提交于 2019-12-27 12:39:12
从现在开始相关文章请到: http://lko2o.com/moon 接着上一篇: 《ASP.NET SignalR系列》第三课 SignalR的支持平台 一、概述   SignalR常常依托于ASP.NET应用程序运行于IIS中,但它还可以自我托管(比如作为console winform、Windows service).只要我们使用self-host库就可以了. 该库向所有的SignalR 2库一样,构建于OWIN ( Open Web Interface for .NET ).OWIN定义了一个在.NET web 服务端和web 应用程序的抽象. OWIN解耦了从服务端来的web 应用程序,这使得OWIN对于子托管web应用程序于自己的进程中得以表现得很完美. 不托管于IIS的原因有: IIS的环境不能构建,比如一个已经存在的服务端程序(没有运行于IIS) IIS的性能开销需要注意的地方 signalr功能需要添加到一个现有的应用程序,比如运行在 Windows Service, Azure worker role, 或者 其他进程 如果我们处于性能原因考虑使用self-host,我们推荐将程序同时在IIS中运行测试,来看看性能的具体好处. 本教程包含以下部分: 创建服务端 用 JavaScript 客户端访问服务端 二、创建服务端 在本教程中

mvc中使用signalR简单应用

懵懂的女人 提交于 2019-12-26 13:59:05
一、前言: 前段时间公司有这方面需求,了解到微软就这样一个技术,通过自己的实践和摸索。发现signalR类库很不错。而且网上也有很多可查的资料供大家学习,应用范围还是很广的。这篇文章把我在使用signalR开发过程中的使用步骤,以及遇到的问题讲述一下,希望对大家有帮助。 二、signalR简介 Asp.net SignalR是微软为实现实时通信的一个类库,一 般情况下,signalR会使用JavaScript的长轮询(long polling)的方式来实现客户端和服务器通信, 随着Html5中WebSockets出现,SignalR也支持WebSockets通信。另外SignalR开发的程序不仅仅限制于宿主在IIS中,也可以宿主在任何应用程序,包括控制台,客户端程序和Windows服务等,另外还支持Mono,这意味着它可以实现跨平台部署在Linux环境下。 signalR 内部有俩个类: 1. Http持久连接(Persisten Connection)对象: 用来解决长时间连接的功能。还可以由客户端主动向服务器要求数据,而服务器端不需要实现太多细节,只需要处理PersistentConnection 内所提供的五个事件:OnConnected, OnReconnected, OnReceived, OnError 和 OnDisconnect 即可。 2. Hub(集线器)对象:

Json result is not displaying

廉价感情. 提交于 2019-12-25 19:49:07
问题 I am facing issue while displaying the result from a ajax call. Contrller json method which returns data from database. The control is coming in the success block of my ajax call but the data is empty. if i debug the controller GetNotifications method it is returning the data. Can somebody help me with this public JsonResult GetNotifications() { IList<Notification> notificationsBody = db.Notifications.ToList(); return Json(new { notificationsBody = notificationsBody }, JsonRequestBehavior

How to do guaranteed message delivery with java client SignalR?

五迷三道 提交于 2019-12-25 19:16:32
问题 I use SignalR on my Android app to exchange messages. Everything works fine, but I just do not know how to resend the message I sent when disconnected from the Internet when I connect to the Internet. please help me i I kept the messages in the list until after connect to internet they were sent back one by one, but this is a wrong way and it does not work. 回答1: You could store your messages in a database table. When a client is connected have messages delivered that are in the database. When

Using SqlDepedency OnChange event with SignalR adds new global event on each refresh and each time new client connects

大兔子大兔子 提交于 2019-12-25 16:38:31
问题 Usually I manage to solve a problem by reading posts here, but this time I can't seem to find the specific answer to my problem. I've been trying SignalR for pushing database changes to each client connected using SqlDependency - this didn't take me long to accomplish. The problem is that each tutorial is giving the exact same examples on how to push notifications to the users/clients, but I can't seem to get it to work. My code looks like this: Startup I initialize the following line when my

Signalr WebSockets not working on Windows server 2012 R2 + IIS 8.5 with enabled websocket protocol, But works on local development machine (Win 10)

浪子不回头ぞ 提交于 2019-12-25 11:52:39
问题 Signalr WebSockets not working on Windows server 2012 R2 + IIS 8.5 with enabled websocket protocol, But works on local development machine (Win 10). Both set-up as per: https://www.iis.net/configreference/system.webserver/websocket Server (Websockets not working) -Windows 2012 R2 Standard -IIS 8.5 -Websockets enabled -Client Chrome version 58 64bit (Running locally on server just like dev machine - to eliminate load balancer, or network issue) Signal returns TryWebSockets:false (SSE,