signalr

Negotiate 404 with SignalR 2.2.1 in Asp.net core application

丶灬走出姿态 提交于 2019-12-12 11:12:00
问题 I've been strugging with this one for a few days now... I have an Asp.net core application which uses .Net 4.6 and SignalR 2.2.1. When running locally in IIS Express from VS 2015 on a Windows 10 pc, everything works fine. It even works when deploying to IIS 10 on my local machine. However, when deploying to IIS on a vm running Windows Server (I've tried 2008 R2, 2012 R2 and 2016 TP5), I consistently get a 404 error when SignalR tries to negotiate. Running as the default website, http:/

Does SignalR Client run on .NET Compact Framework?

≡放荡痞女 提交于 2019-12-12 11:09:39
问题 I haven't found any documentation on what platforms SignalR supports, and would like to know whether SignalR Client runs on .NET Compact Framework? 回答1: The SignalR .NET client is built the TPL (http://msdn.microsoft.com/en-us/library/dd460717(VS.100).aspx) and only works on .NET 4.0 and above. There was a .NET 3.5 version but we've deprecated it in the latest release. You can certainly write a client for the compact framework but we don't have plans to write one at the moment. 来源: https:/

Client Function Not getting called SignalR

不打扰是莪最后的温柔 提交于 2019-12-12 10:56:44
问题 Controller class Where Hub is defined public abstract class MonitoringProfileLogChartController : Croem.NotificationManager.Website.Base.BaseController.BaseController { public ActionResult Index() { BusinessLogicReturn result = new ProcessBusinessLogic.Logic().GetRegisteredContexts(); return base.TransalateToAction(result); } public ActionResult LiveMonitoringProfileLogChart() { return View(); } public ActionResult test() { return View(); } **below is rest of the code of controller where our

Signalr IConnectionIdGenerator not found in SignalR 1.0rc2 release

帅比萌擦擦* 提交于 2019-12-12 10:13:57
问题 I used to implement my own connection id generator with the following code: public class MyConnectionFactory : IConnectionIdGenerator { public string GenerateConnectionId(IRequest request) { return MyUserManager.Instance.CurrentUserID.ToString(); } } This was working fine with SignalR 0.5.3 release but after updating to SignalR 1.0rc2 release the namespace or class name is not found. Also, I am not able to find any note on this breaking change here https://github.com/SignalR/SignalR/blob

Ignoring a client when broadcasting a message with SignalR

随声附和 提交于 2019-12-12 10:10:38
问题 I want to ignore the client that made the request to broadcast the message my web app. The only way I can seem to do this is by caching the connectionId of the current user: public class BroadcastHub : Hub { public override Task OnConnected() { System.Runtime.Caching.MemoryCache.Default.Set(HttpContext.Current.User.Identity.Name + "-connectionId", Context.ConnectionId, new CacheItemPolicy() { Priority = CacheItemPriority.Default, SlidingExpiration = TimeSpan.FromHours(1), AbsoluteExpiration =

Azure Web Jobs and SignalR memory leak

十年热恋 提交于 2019-12-12 09:56:59
问题 So I have some webjobs that occasionally connect to a signalr hub and broadcast a message. Below is just an example of one, in this case its a simple web job for development with the TimerTrigger attribute that is set to run continuously every 20 seconds. Like that shown in the code below. public static void Main() { JobHostConfiguration config = new JobHostConfiguration(); config.Tracing.ConsoleLevel = TraceLevel.Verbose; config.UseTimers(); if (config.IsDevelopment) { config

SignalR MethodAccessException

和自甴很熟 提交于 2019-12-12 09:39:23
问题 i got this error when i try to debug a simple signalr app Attempt to access the method 'Microsoft.AspNet.SignalR.DependencyResolverExtensions.InitializePerformanceCounters(Microsoft.AspNet.SignalR.IDependencyResolver, System.String, System.Threading.CancellationToken)' by the method 'Microsoft.AspNet.SignalR.RouteExtensions.MapHubs(System.Web.Routing.RouteCollection, System.String, Microsoft.AspNet.SignalR.IDependencyResolver)' failed === Edited [Added more INFO] === ok added SignalR by

signalR tracking connected users

岁酱吖の 提交于 2019-12-12 08:12:39
问题 I need to check whether a specific user is still connected. I have the following HashSet that keeps track of users: public static class UserHandler { public static HashSet<string> ConnectedIds = new HashSet<string>(); } So on disconnected: public override Task OnDisconnected() { UserHandler.ConnectedIds.Remove(this.Context.ConnectionId); if (UserHandler.ConnectedIds.Count == 0) { // STOP TASK -> SET CANCELLATION } return base.OnDisconnected(); } and on Connected: public override Task

How do I configure IIS 7.5 for SSE (Server Sent Events) and SignalR

ぐ巨炮叔叔 提交于 2019-12-12 07:57:34
问题 I have tested my Asp.NET MVC application to run SignalR and it properly handles the text/event-stream MIME with a serverSentEvents connection, using Visual Studio 2012, IIS Express (Microsoft-IIS/8.0) and Chrome. Now that I am deploying to production environment (IIS 7.5, .NET Framework 4.5, Windows Server 2008R2), I've noticed that SignalR always falls back to LongPolling transport, since the signalr/connect?transport=serverSentEvents etc times out. Is there a way to configure Microsoft-IIS

SignalR - Send message OnConnected

橙三吉。 提交于 2019-12-12 07:49:52
问题 I've been experimenting with SignalR today and It's really neat. Basically what I wanted to achieve is the following: As soon as a device connects it should send a message to the first one. If there are more devices than 1 connected I would like to send two messages. One to all except the last connected client. And one message to only the last connected client. The code I've been using works perfect when I place it in a custom API controller and basically call the action, but that's not what