使用sqlserver scaleout时,signalr无法连接到LongPolling或serverSentEvents传输

时间:2017-07-02 11:29:51

标签: signalr signalr-backplane

当我使用带有信号器GlobalHost.DependencyResolver.UseSqlServer的sqlserver scaleout时,它无法连接到LongPollingserverSentEvents传输。

之前有人遇到此错误,我正在使用signalr 2.2.1signalr.sqlserver 2.2.1

这是我在owin启动类中的完整代码

 GlobalHost.Configuration.TransportConnectTimeout = TimeSpan.FromSeconds(30); 
    string sqlConnectionString = "Server=NCBCDEV;Database=SignalR2;Integrated 
    Security=true"; SqlScaleoutConfiguration sqlcon = new 
    SqlScaleoutConfiguration(sqlConnectionString); 
    GlobalHost.DependencyResolver.UseSqlServer(sqlcon ); app.MapSignalR(); 
    GlobalHost.DependencyResolver.Register(typeof(Microsoft.AspN‌​et.SignalR.Hubs.IAss‌​emblyLocator), () => new AssemblyLocator()); 

EventSource已连接:

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
13:59:38.278 
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.

0 个答案:

没有答案