Azure / azure-signalr

Azure SignalR Service SDK for .NET
https://aka.ms/signalr-service
MIT License
425 stars 100 forks source link

Azure SignalR SDK is not working within Orchard Core Module #1193

Closed lampersky closed 3 years ago

lampersky commented 3 years ago

Describe the bug

When using Azure SignalR SDK within orchard module I'm not getting response for keep-alive request {"type":6}. Everything works fine when switching to local SignalR.

To Reproduce

1) Repro repo is located here https://github.com/lampersky/OrchardModuleWithAzureSignalRServiceSDK, (Repro project is made using dotnet cli, ocmvc + ocmodulemvc), 2) Edit Startup.cs in Repro.TestModule and in SimpleMvc.Web by providing connection string to your AzureSignalR instance, .AddAzureSignalR("Endpoint=https://your-endpoint.signalr.net;AccessKey={your-access-key};Version=1.0;"); or comment out this line to run project without Azure SignalR Service, 3) Run Repro.Web project and check Network tab in your browser.

Exceptions (if any)

No exceptions just no response for ping request.

Further technical details

Connected Issue

I've also created bug in Orchard Core issue tracker, where you can find more (maybe usuful) details: https://github.com/OrchardCMS/OrchardCore/issues/8409

lampersky commented 3 years ago

I'm closing this issue.

Orchard core doesn't support IHostedService, that's why HeartBeat service is registered but not started, and this is why we can observe missing keep alive message.

https://github.com/OrchardCMS/OrchardCore/issues/8409#issuecomment-831963537