1

I have a .NET Framework v4.8 app which is deployed on a Azure App Service instance and currently implements local SignalR service. When I tried to scale out the app without setting the ARRAffinity cookie, SignalR messages get lost and sometimes may work when subsequent requests go to the same server randomly.

To avoid this behavior, I created an Azure SignalR Service and set my application to use it as described in the official Microsoft docs, but when the JS client starts the negotiate call it just returns the default error handling response which is a redirect to an error page. Therefore, none of the SignalR messages work within the app.

enter image description here

However, the app and server output shows that SignalR hub connections are being made, and the ASRS shows connections happening but no messages being sent:

enter image description here

When running the app in localhost, it returns a HTTP 500 error without any description or message.

This is what the Configuration method on Startup.cs file looks like:

public void Configuration(IAppBuilder app)
    {
        // Any connection or hub wire up and configuration should go here
        //app.MapSignalR(); 
        app.MapAzureSignalR(this.GetType().FullName);
        GlobalHost.TraceManager.Switch.Level = SourceLevels.Information;

    }

Am I missing any further set up in Azure portal to make the ASRS work properly?

Update: modified the app config to show errors, the negotiate endpoint is showing this:

enter image description here

Seems like something in that endpoint is trying to create a SQL Server Express DB in App_Data directory. No idea why.

Sebas3552
  • 41
  • 6
  • 1
    Do you have any `Connection string` other than `SignalR`,If yes, make sure you have provided the correct Connection. – Harshitha Oct 19 '22 at 07:09
  • Yes, in the `connectionStrings` section of the web.config I have the SignalR string as well as the app SQL Server database connection string. The SignalR connection string is named `Azure:SignalR:ConnectionString` as that is the default string that `app.MapAzureSignalR()` takes when no connectionString parameter is specified. – Sebas3552 Oct 19 '22 at 07:24
  • Have you referred [network-related issues](https://www.sqlnethub.com/blog/network-related-instance-specific-error-occurred/) document. – Harshitha Oct 19 '22 at 07:31

0 Answers0