signalr

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 Clients.Users(userIds).send(msg) not firing

北城以北 提交于 2019-12-25 08:26:29
问题 I have single R version 2.2.1. I implement custom Id Provider public class ChatUserIdProvider : IUserIdProvider { public string GetUserId(IRequest request) { if (request.User.Identity.IsAuthenticated) { Guid.Parse(request.User.Identity.GetUserId().ToString()); var userId = request.User.Identity.GetUserId().ToString(); return userId.ToString(); } return "Un Known"; } } I made a simple chat app and every think OK, but when I try to send a message to multi users the client event not firing here

How does SignalR register its HTTP Handler in the project?

早过忘川 提交于 2019-12-25 05:32:42
问题 I have been looking for an hour and am baffled why the SignalR sample code actually works! I got it installed from nuget and it just works, which is good but cannot see how. I cannot see anything in the global.asax or web.config to register the HttpHandler. I suspect this is probably a static constructor in some class and adds the handler (although again with no code using the class, that will not work), but cannot figure out without looking at the code - and for this, I dont feel like going

Does SignalR work on Mobile

假装没事ソ 提交于 2019-12-25 05:25:33
问题 It might be a simple question but I am struggling to find the asnwer. Can anyone tell me if SignalR is supported across mobile browsers such as S3 or pads etc? I can see it falls back to long polling if websockets are not supported but I can find out if this is supported in mobile browsers? I found an online tic tac toe demo but this doesnt work on my mobile. Thanks for anyhelp... M 回答1: Do you mean in the browser or if native apps can do it? If the browser supports the required transport

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

Pushing updates from event log to webpage not working in IE8

岁酱吖の 提交于 2019-12-25 04:42:51
问题 In my MVC4 application I have some code to push a new entry in the eventlog to a webpage with SignalR. This code works in FireFox, but in IE8 when a new event is added to the event log the debugger pops up with Error: Object doesn't support this property or method and stops at the following code: this.notifyListeners = function (queryName, evt) { registeredListeners.forEach(function (item) { if (item.queryName === queryName) { item.listener.newEvent(evt); } }); }; When I step over this method

SignalR LongPolling crashes with a little of stress

Deadly 提交于 2019-12-25 04:24:42
问题 I have a prototype that works well with SSE and WebSockets , but crashes when using LongPolling in the moment that I put a little bit of stress in the browser. My app can create games, and each game generate its own events, and those events must be sent to the browser. I have a button to create one, ten and a hundred games at once. Create each game requires a POST call to a WebAPI, so the x10 button creates 10 requests and x100 creates 100 requests to the server. When I use SSE or WS, it

How to use a Singleton Signalr client within an MVC application

大城市里の小女人 提交于 2019-12-25 04:19:15
问题 I have a need to use a .net client to connect to a Signalr enabled application. The client class needs to be a singleton and loaded for use globally. I want to know what is the best technique for using singletons globally within an MVC application. I have been looking into using the application start to get the singleton, where I keep it is a mystery to me. 回答1: The HUB cant be a singleton by design SignalR creates a instance for each incoming request. On the client I would use a IoC

How to use SignalR for autorefresh like data

若如初见. 提交于 2019-12-25 03:42:30
问题 I've been looking into using SignalR for a while now, and I think I have a good candidate for it. I have a page which allows users of the system to leave Comments , and at the moment it uses JQuery to periodically refresh the list of comments. I think SignalR would replace this nicely, i.e. if there were two users looking at the list and one wrote a comment, I would like it to appear instantly in the second. All well and good, I have a sort of template where this works. However My system

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