signalr

Visual Studio 2013 Browser Link - Enable CTRL to Edit in Browser

拟墨画扇 提交于 2019-12-06 03:59:42
问题 How do you enable CTRL key for the Visual Studio Browser Link integration? Scott Hanselman discusses it here around 1:06:00 during the VS 2013 Launch Event. I'm not sure how to activate or enable the realtime HTML Edit feature so I can edit in the browser and have the changes pushed back to Visual Studio. Has anyone tried this out yet or can provide clues? I have VS 2013 RTM - I can't seem to find any update for ASP.NET Web Tools that may have changed this behavior. Is this an IE only

MapHubs not needed in SignalR 1.01?

北战南征 提交于 2019-12-06 03:58:39
问题 I am following the Hubs Quick Start Guide in the Signalr Wiki. I get an error in Global.asax, Application_Start on the line RouteTable.Routes.MapHubs(). A route named 'signalr.hubs' is already in the route collection. Route names must be unique. Parameter name: name Maybe this is not needed anymore in 1.0.1? It worked fine in 1.0. It is also mentioned in the readme.txt from NuGet that we need the MapHubs command. System.ArgumentException was unhandled by user code Message=A route named

SignalR, WebAPI and MVC sharing the same dependency resolver kernel

对着背影说爱祢 提交于 2019-12-06 03:54:10
I have an ASP.NET MVC app with SignalR and WebAPI . The app uses Ninject for dependency injection, but apparently SignalR and WebAPI are getting different kernels, so it fails to share a singleton object that should be shared for all the application. I can see clearly in the log how an instance is created when SignalR gets a connection request, and other when WebAPI gets a request. I want to have the same Ninject kernel shared among these three elements, so I can have unique singletons. This is what I have done so far: The first thing I have done is creating a NinjectModule declaring the

Simple example of signalR not working

五迷三道 提交于 2019-12-06 02:48:56
问题 Not able to get SignalR working in my machine (with IE9). On entering some text and clicking submit, the text is not getting listed as intended. Also, I would expect the list getting updated from multiple instances of browser and It does not happen. There is no error. Could anybody help here? C# namespace TestSignalR.Hubs { using System; using System.Collections.Generic; using System.Linq; using System.Web; /// <summary> /// Summary description for ChatHub. /// </summary> public class ChatHub

Regarding hosting SignalR in console apps

♀尐吖头ヾ 提交于 2019-12-06 02:45:31
i got a code which host SignalR in console apps. here is the code. Install-Package Microsoft.Owin.Hosting -pre Install-Package Microsoft.Owin.Host.HttpListener -pre Install-Package Microsoft.AspNet.SignalR.Owin -pre using System; using Microsoft.AspNet.SignalR; using Microsoft.Owin.Hosting; using Owin; namespace SignalR.Hosting.Self.Samples { class Program { static void Main(string[] args) { string url = "http://172.0.0.01:8080"; using (WebApplication.Start<Startup>(url)) { Console.WriteLine("Server running on {0}", url); Console.ReadLine(); } } } class Startup { public void Configuration

Cannot pass a DependencyResolver to MapSignalR in a HubConfiguration

六眼飞鱼酱① 提交于 2019-12-06 02:42:40
I have a MVC 4 app where I'm using SignalR and a dependency injection framework. Thus, I needed to implement a custom DependencyResolver. In order to wire it up, I'm using var resolver = new CustomSignalRDependencyResolver(...); GlobalHost.DependencyResolver = resolver; app.MapSignalR(); and everything works as expected. However, if I use a HubConfiguration object like this: var resolver = new CustomSignalRDependencyResolver(...); app.MapSignalR(new HubConfiguration( { Resolver = resolver }); everything seems to work (the objects are correctly wired-up, there are no errors or warning

Scope error when using Autofac with SignalR

寵の児 提交于 2019-12-06 02:23:40
问题 I'm trying to inject an HttpContextBase in my SignalR hub: public class EventHub : Hub, IDisconnect { private readonly HttpContextBase _httpContextBase; public EventHub(HttpContextBase httpContextBase) { _httpContextBase = httpContextBase; } [...] } The registration code looks like this: private static void InitAutofac() { var builder = new ContainerBuilder(); var assembly = typeof (MvcApplication).Assembly; builder.RegisterControllers(assembly).PropertiesAutowired(); builder.RegisterModule

SignalR Groups.Add times out and fails

泄露秘密 提交于 2019-12-06 01:48:18
I'm trying to add a member to a Group using SignalR 2.2. Every single time, I hit a 30 second timeout and get a "System.Threading.Tasks.TaskCanceledException: A task was canceled." error. From a GroupSubscriptionController that I've written, I'm calling: var hubContext = GlobalHost.ConnectionManager.GetHubContext<ProjectHub>(); await hubContext.Groups.Add(connectionId, groupName); I've found this issue where people are periodically encountering this, but it happens to me every single time. I'm running the backend (ASP.NET 4.5) on one VS2015 launched localhost port, and the frontend (AngularJS

SignalR: /signalr/abort throws error

十年热恋 提交于 2019-12-06 01:47:33
问题 Refused to execute script from '.../signalr/abort?transport=webSockets&clientProtocol=1.5&callback=jQuery32109752453231046265_1507885522267&_=1507885522271' because its MIME type ('') is not executable, and strict MIME type checking is enabled. A part of url was removed for clarity. I have the last stable version of Microsoft.Owin.Host.SystemWeb (3.1.0) and jquery.signalR-2.2.2.js . I'm using CORS. /signalr/start is working just fine. Any ideas? 来源: https://stackoverflow.com/questions

SignalR Context.User.Name returns empty

♀尐吖头ヾ 提交于 2019-12-06 01:30:33
Whenever I try to access Context.User.Identity from a Hub , the user details are always empty. Note: Context.User does not return null, the properties are just empty: I've taken a look at a multitude of questions on SO similar to this, but all of them seem to be asking why the Context.User is null , and the answer is to move app.MapSignalR(); below ConfigureAuth(); , as I have done: public void Configuration(IAppBuilder app) { ConfigureAuth(app); app.MapSignalR(); } The HttpContext.Current.User also returns empty, but again, only from within a Hub . If I call it from any other Controller , I