I'm using
GlobalHost.DependencyResolver.UseSqlServer(ConfigurationManager.AppSettings["ConnectionString"]);
to set up an SQL backplane for a web application that uses signalR (version 2.2.1). The web application is hosted on multiple servers and on multiple sites in production. Each site has its own database.
This works fine on most servers (signalR connects and messages flow between clients as expected).
However - For some sites signalR fails to connect, and the following message is present in the fail() callback handler (client side javascript):
"No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization."
When enabling client side logging, it shows that signalR can't connect using any protocol.
SignalR: Fallback transports exhausted.
The only difference between working-sites and non-working sites are the database connectionstring. When debugging locally (on my dev machine) against the production db I see the same behavior. So I thought the problem was related to the SignalR tables in the db, but when scripting the production db and restoring it locally, the problem isn't there. The connectionstring is identical for all websites except the db name.
I can't figure out why signalR won't connect for a few sites (2 out of 30~) - the only difference being the database. If I comment out/disabling the UseSqlServer configuration it works, but then synchronization isn't enabled of cause.
Any suggestions how to solve this are welcome. I've seen posts related to signalR not being able to connect, and the suggested solution was related to an implementation of Application_PreSendRequestHeaders in global.asax. That doesn't seem to be the problem in this case though.