signalr-hub

SignalR .Net Client - Unexpected character encountered while parsing value

笑着哭i 提交于 2019-12-21 01:21:32
问题 I'm trying to set up a .Net client to send messages to my signalR hub from my service layer. I'm following this guide: http://www.asp.net/signalr/overview/signalr-20/hubs-api/hubs-api-guide-net-client#callserver This is what I have: _hubConnection = new HubConnection(_baseUrl); // "http://localhost:3806" _hubProxy = _hubConnection.CreateHubProxy("AppHub"); _hubConnection.Start().Wait(); The hub lives inside of the same project - it's an MVC application with forms authentication. I can never

SignalR .Net Client - Unexpected character encountered while parsing value

☆樱花仙子☆ 提交于 2019-12-21 01:21:22
问题 I'm trying to set up a .Net client to send messages to my signalR hub from my service layer. I'm following this guide: http://www.asp.net/signalr/overview/signalr-20/hubs-api/hubs-api-guide-net-client#callserver This is what I have: _hubConnection = new HubConnection(_baseUrl); // "http://localhost:3806" _hubProxy = _hubConnection.CreateHubProxy("AppHub"); _hubConnection.Start().Wait(); The hub lives inside of the same project - it's an MVC application with forms authentication. I can never

SignalR - adding hubs at runtime

蓝咒 提交于 2019-12-20 06:19:00
问题 I have a working SignalR application, my global.asax.cs does all the usual MapHubs() etc, and I'm using a custom IAssemblyLocator which also loads in-memory assemblies as well as referenced assemblies. The two hubs I have are created at runtime in in-memory assemblies, and this works fine - hubs can push messages to clients etc. At some point after the application has started, I want to add another hub at run time which will sit in it's own in-memory assembly, and make it appear in the

SignalR configuration on IIS 6 / windows server 2003 R2

时光总嘲笑我的痴心妄想 提交于 2019-12-20 03:51:19
问题 I'm getting error 404 when I access signalr/hubs url on a web app deployed on IIS 6 / winSrv 2003 r2. I've tried runAllManagedModulesForAllRequests = true and false. However I found in one of the #issues a comment that says that this is for II7 and >. Also I've set the wildcard mapping to v4.0.30319\aspnet_isapi.dll and still getting the same error 404. IIS 6 Log error: W3SVC1 127.0.0.1 GET /devweb/signalr/hubs - 80 - 127.0.0.1 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+Trident/4.0;+

Change Global Settings Config in SignalR Core

对着背影说爱祢 提交于 2019-12-19 08:32:22
问题 I am using SignalR Core with ASP.Net Core . I want to override GlobalHost settings for signalR. I am getting this - protected void Application_Start(object sender, EventArgs e) { // Make long polling connections wait a maximum of 110 seconds for a // response. When that time expires, trigger a timeout command and // make the client reconnect. GlobalHost.Configuration.ConnectionTimeout = TimeSpan.FromSeconds(110); // Wait a maximum of 30 seconds after a transport connection is lost // before

The On event on the SignalR Client Hub does not get called

柔情痞子 提交于 2019-12-18 14:14:38
问题 I seem to have an issue with SignalR's JS Client Hub. The problem is that the 'on' handler does not seem to work - it generates no error but doesn't receive any signals sent by the server. The code below shows an extract where I call the server (using the invoke) which works fine - then on the server I call back to acceptHubData which should be picked up on the client but isn't. My objective is when navigating to pages that each page will open a connection to a specific hub and releases this

Signalr doesn't call client side functions

落爺英雄遲暮 提交于 2019-12-18 13:00:49
问题 I'm using the VS2012 "Fall" Update with the Signalr 1.0.0 package. Calling server side functions works fine. However client functions are not called. Nothing seems to happen when onBroadcastMessage() (see below) is called. Questions: What am I missing? Is there a way to debug the client call? Thanks! Server code: using Microsoft.AspNet.SignalR; namespace KPMain { public class RealtimeConnectionHub : Hub { public void BroadcastMessage(string name, string message) { Clients.All

How do I call a SignalR hub method from the outside?

穿精又带淫゛_ 提交于 2019-12-18 12:16:44
问题 This is my Hub code: public class Pusher : Hub, IPusher { readonly IHubContext _hubContext = GlobalHost.ConnectionManager.GetHubContext<Pusher>(); public virtual Task PushToOtherInGroup(dynamic group, dynamic data) { return _hubContext.Clients.Group(group).GetData(data); } } I want call this method in another project with this code: var pusher = new Pusher.Pusher(); pusher.PushToOtherInGroup("Test", new {exchangeTypeId, price}); I want call PushToOtherInGroup ,when calling the method i don't

SignalR + Dependency Injection Questions

左心房为你撑大大i 提交于 2019-12-18 12:12:30
问题 I am using SignalR in my MVC3 application, and since I have implemented StructureMap Dependency Injection on my controllers I would like to do the same in my hub, but I can't seem to get it working. Please tell me what's wrong with my codes below: SignalRSmDependencyResolver.cs public class SignalRSmDependencyResolver : DefaultDependencyResolver { private IContainer _container; public SignalRSmDependencyResolver(IContainer container) { _container = container; } public override object

SignalR + Dependency Injection Questions

泪湿孤枕 提交于 2019-12-18 12:11:37
问题 I am using SignalR in my MVC3 application, and since I have implemented StructureMap Dependency Injection on my controllers I would like to do the same in my hub, but I can't seem to get it working. Please tell me what's wrong with my codes below: SignalRSmDependencyResolver.cs public class SignalRSmDependencyResolver : DefaultDependencyResolver { private IContainer _container; public SignalRSmDependencyResolver(IContainer container) { _container = container; } public override object