I am developing a chat app with dotnet core and singalR. 2 days ago I learned that I need to use Azure SigalR service to scale my chat servers. So I started to create an Azure signalR service and implement it in my project. My chat is working as excepted on single server. But when add AddSignalR part to code, my app is giving connection error :
Error while establishing connection Error
My startup.cs code
services.AddSignalR()
.AddAzureSignalR("Endpoint=https://*******.service.signalr.net;AccessKey=************;Version=1.0;");
if I remove .AddAzureSignalR() part from code. It s working as expected again.
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
endpoints.MapHub<ChatHub>("/chat");
endpoints.MapHub<OnlineHub>("/online");
});
I ve both tried Microsoft.Azure.SignalR.Management and Microsoft.Azure.SignalR nuget packages. I got same error on both. Also I m using free option of Azure SignalR service
Is there anyone who can have an idea about why do I lose the connection ?