signalr-hub

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

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';

How to make AutoFac use same instance of nested dependency per top-level object? (SignalR dependency injection per hub)

 ̄綄美尐妖づ 提交于 2019-12-30 07:34:08
问题 I am trying to set up my AutoFac registration in such a way that this test passes: [Test] public void Autofac_registration_test() { // Given var builder = new ContainerBuilder(); RegisterServices(builder); var container = builder.Build(); // When var firstHub = container.Resolve<Hub>(); var secondHub = container.Resolve<Hub>(); // Then firstHub.Should().NotBe(secondHub); firstHub.FooRepo.Context.Should().Be(firstHub.BarRepo.Context); firstHub.FooRepo.Context.Should().NotBe(secondHub.FooRepo

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 & IE Issue - poll is pending

て烟熏妆下的殇ゞ 提交于 2019-12-25 11:26:09
问题 I have a Problem With IE and SignalR, I'm using the it to perform a Syncing action between two databases, the Actions Completed successfully on Google Chrome / Firefox / Safari in all scenarios. Using IE for the First time the sync performed successfully but only for one time, in the second time a pending request stack and the page stay freeze for ever. I found a solution online which is changing the transport mode. But page still freezing. if (isIE()) { $.connection.hub.start({ transport: [

SignalR- Jquery : $.connection.chathub returns undefined

此生再无相见时 提交于 2019-12-25 08:48:21
问题 I'm creating a chat application using Asp.net MVC, AngularJs, SignalR and Jquery. In the Chat View when I'm trying set the value for chat object it passes null value the code reference is inside the brackets ( var chat=$.connection.chathub;). No other function works because of this. I'm using "Microsoft.AspNet.SignalR.2.2.2" in this project. And jquery and signalr related scripts such as 'jquery.signalR-2.2.2.js ,jquery-ui-1.12.1.js' and few other jquery libraries as well. Can anyone help me

SignalR-rc2 No IConnectionIdPrefixGenerator support any more

*爱你&永不变心* 提交于 2019-12-25 05:22:46
问题 as of signalr-rc2, IConnectionIdPrefixGenerator is not supported?o if so, any plan to expose it later? 回答1: Nope, we own the connection id. If you want extra data you need to use the query string. 来源: https://stackoverflow.com/questions/14511645/signalr-rc2-no-iconnectionidprefixgenerator-support-any-more

Signalr server side, OnDisconnect only called for 1 hub

女生的网名这么多〃 提交于 2019-12-25 03:25:11
问题 I am writing a web application an it uses SignalR. On the server c#, I have two hubs. It really does need to be two otherwise I would just merge them and solve the problem. The problem that I am having, is that while I am aware that SignalR client side, hubs will share a connection. The issue I am having, is that when I close the browser, or call stop on the client. Only 1 of my server side OnDisconnect(bool stopCalled) events will fire. I somehow expected that both would fire when the client

MVC SignalR not firing from Controller Post Method

末鹿安然 提交于 2019-12-24 22:44:08
问题 When Saving schedule to calendar it must auto update the activity logs on my notification bar in my Home Controller. It saves the data but only show when notification bar is refreshed. It seems that Hub is not starting when saved. CalendarController.cs [HttpPost] public JsonResult SaveSchedule(Schedule s) { var userid = User.Identity.GetUserId(); var profile = _context.Profiles.Single(p => p.Id == userid); var status = false; if (s.Schedule_ID > 0) { //Update var v = _context.Schedules.Where