I'm hosting my ASP.NET Core app - targeting .NET 8 - on Azure App Service running on Linux with a Basic (B1) hosting plan. My app uses SignalR as well.
I don't see a SignalR option under Settings > Configuration. I read somewhere that on Linux, WebSockets are always on but my .NET MAUI app is unable to establish a SignalR connection with my ASP.NET Core app.
Any ideas/suggestions?
The following document makes publishing an ASP.NET Core SignalR app to Azure App Service on Linux clear.
I want to clarify three important points here:
Here's the Microsoft documentation that provides detailed information on this: https://learn.microsoft.com/en-us/aspnet/core/signalr/publish-to-azure-web-app?view=aspnetcore-8.0#configure-the-app-in-azure-app-service
Here's another useful document that provides FAQ for App Service on Linux: https://learn.microsoft.com/en-us/troubleshoot/azure/app-service/faqs-app-service-linux
One final point: a few suggested using Azure SignalR service here. The Azure SignalR service is definitely a good choice when needed but one needs to assess that need carefully. From everything I've read so far, the primary benefits of using Azure SignalR service are scalability and management of connections. With that said even the "Basic" hosting plan on Linux seems to support ~50K web sockets per instance. Here's the link to the documentation that provides this info: https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits#app-service-limits
It may not be necessary to jump to Azure SignalR service unless the requirements of the app warrant it.