Last post Jul 25, 2017 08:45 AM by Fei Han - MSFT
Jul 03, 2017 11:34 AM|mohamedhamed|LINK
When i am using sqlserver scaleout with signalr GlobalHost.DependencyResolver.UseSqlServer, it failed to connect to LongPolling or serverSentEvents transport.
Anyone faced this error before, i am using signalr 2.2.1 and signalr.sqlserver 2.2.1.
here is my full code in owin startup class
string sqlConnectionString = "Server=NCBCDEV;Database=SignalR2;Integrated
Security=true"; SqlScaleoutConfiguration sqlcon = new
GlobalHost.DependencyResolver.UseSqlServer(sqlcon ); app.MapSignalR();
GlobalHost.DependencyResolver.Register(typeof(Microsoft.AspNet.SignalR.Hubs.IAssemblyLocator), () => new AssemblyLocator());
and the log trace is:
13:59:38.277 :82/signalr/hubs/connect?transport=serverSentEvents&clientProtocol=1.5&conn…48Kldg%3D%3D&connectionData=%5B%7B%22name%22%3A%22chathub%22%7D%5D&tid=0:1 GET http://ncbcdev:82/signalr/hubs/connect?transport=serverSentEvents&clientPro…zC48Kldg%3D%3D&connectionData=%5B%7B%22name%22%3A%22chathub%22%7D%5D&tid=0 net::ERR_CONNECTION_RESET
SignalR: serverSentEvents transport failed to connect. Attempting to fall back.
longPolling transport starting.
SignalR: longPolling transport failed to connect. Attempting to fall back.
13:59:52.655 jquery.signalR-2.2.1.min.js:9 [13:59:52 GMT+0300 (Arab Standard Time)] SignalR: Fallback transports exhausted.
Jul 25, 2017 08:45 AM|Fei Han - MSFT|LINK
it failed to connect to LongPolling or serverSentEvents transport.
As far as I know, each transport option has a set of requirements of its own, if the system requirements for a transport are not available, SignalR will gracefully failover to other transports.
The following list shows the steps that SignalR uses to decide which transport to use. For detailed information, please check "Transport selection process" section in
If a cross-domain connection is being made (that is, if the SignalR endpoint is not in the same domain as the hosting page), then WebSocket will be used if the following criteria are met:
The server supports WebSocket
If any of these criteria are not met, Long Polling will be used. For more information on cross-domain connections, see
How to establish a cross-domain connection.