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.
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:
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:
Seems like something in that endpoint is trying to create a SQL Server Express DB in App_Data directory. No idea why.