signalr-hub

SignalR configuration on IIS 6 / windows server 2003 R2

依然范特西╮ 提交于 2019-12-02 03:07:20
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;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.4506.2152;+.NET+CLR+3.5.30729;+.NET4.0C;+.NET4.0E)

How to configure Autofac and SignalR in a MVC 5 application

蹲街弑〆低调 提交于 2019-12-01 21:28:36
I am trying to configure an MVC 5 application to use SignalR 2.2.x and inject a service into my NotificationsHub . We are using Autofac for MVC but I am not sure on how to correctly configure this. Autofac documentation exists for NuGet Autofac.Integration.SignalR (3.0.2) and Autofac.Integration.Mvc (3.3.4) . What I am doing so far is register the hubs via: ContainerBuilder builder = new ContainerBuilder(); // Register MVC controllers. builder.RegisterControllers(typeof(MvcApplication).Assembly); builder.RegisterType<ServiceForSignalRHub>().AsImplementedInterfaces(); builder.RegisterType<...>(

Signalr Hub in Separate Dll

被刻印的时光 ゝ 提交于 2019-12-01 11:21:30
I had a hub hosted in a console app with a WPF app connecting to it. It worked just fine. Then I moved the hub into a separate project and added a reference from the host to new project. Now I am getting a 500 error, with no other details. Is there anything different that needs to be done in order to host a hub from another assemble/namespace? Edit: I tried a few things after opening the question. Here is what I have tried so far: Setting the HubName attribute. - Did not work. Passing the full namespace + class into HubConnection.CreateHubProxy. - Did not work. Putting my hub class into the

SignalR with IoC (Castle Windsor) - which lifetime for hubs?

邮差的信 提交于 2019-12-01 06:36:17
I'm just starting out with SignalR, and have created a custom resolver for SignalR, so I can use Castle Windsor to inject dependencies via hub constructors. I kind of assumed that I would only need to register the dependencies, but I found that it was also necessary to register the hubs themselves before my app would work. Is this expected? If so, what lifetime should I use for hubs? By default SignalR does not register each hub with the dependency resolver. Instead it uses an IAssemblyLocator to find available assemblies that might contain SignalR Hubs. Then the IHubDescriptorProvider

SignalR CryptographicException on AzureWebsites

偶尔善良 提交于 2019-12-01 06:16:11
问题 I got this exception with SignalR, deployed in Azure WebSites. It works fine in debug environment. It's SignalR 1.0.1 and I use .NET MVC and WebApi The data protection operation was unsuccessful. This may have been caused by not having the user profile loaded for the current thread's user context, which may be the case when the thread is impersonating. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more

How do I add Group support to a mocked Client in a SignalR 2.x unit testing framework?

纵然是瞬间 提交于 2019-12-01 06:01:35
I'm using Moq to build up a UnitTest framework for my SignalR 2.x application. I am currently mocking up my Clients by: var mockClients = new Mock<IHubCallerConnectionContext>(); Clients = mockClients.Object; In order to test, I need to test sending messages by Group: Clients.Group(groupName).sendSomeMessage(message); How do I add Group support to my mocked up Client? Check this: https://github.com/SignalR/SignalR/blob/release/tests/Microsoft.AspNet.SignalR.Tests/Server/Hubs/HubFacts.cs public void HubsGroupAreMockable() { var hub = new MyTestableHub(); var mockClients = new Mock

Change Global Settings Config in SignalR Core

天大地大妈咪最大 提交于 2019-12-01 05:26:56
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 raising the Disconnected event to terminate the SignalR connection. GlobalHost.Configuration

How do I add Group support to a mocked Client in a SignalR 2.x unit testing framework?

扶醉桌前 提交于 2019-12-01 03:45:28
问题 I'm using Moq to build up a UnitTest framework for my SignalR 2.x application. I am currently mocking up my Clients by: var mockClients = new Mock<IHubCallerConnectionContext>(); Clients = mockClients.Object; In order to test, I need to test sending messages by Group: Clients.Group(groupName).sendSomeMessage(message); How do I add Group support to my mocked up Client? 回答1: Check this: https://github.com/SignalR/SignalR/blob/release/tests/Microsoft.AspNet.SignalR.Tests/Server/Hubs/HubFacts.cs

SignalR with IoC (Castle Windsor) - which lifetime for hubs?

点点圈 提交于 2019-12-01 03:03:11
问题 I'm just starting out with SignalR, and have created a custom resolver for SignalR, so I can use Castle Windsor to inject dependencies via hub constructors. I kind of assumed that I would only need to register the dependencies, but I found that it was also necessary to register the hubs themselves before my app would work. Is this expected? If so, what lifetime should I use for hubs? 回答1: By default SignalR does not register each hub with the dependency resolver. Instead it uses an

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

六月ゝ 毕业季﹏ 提交于 2019-12-01 01:39:13
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.Context); } i.e. I want to use the same Context object all the way down within a single Hub , but use a