我们可以强制SignalR使用长轮询连接方法吗

Raj*_*Raj 2 c# signalr

我们目前在我们的应用程序中使用signalR。如果我是唯一使用该应用程序的人,它会很好用,但是当同时有两个以上的人同时使用该应用程序时,它会完全崩溃。

发生这种情况是由于IIS并发连接的限制。

IIS并发请求限制

Windows 8(基本版)-3

Windows 8专业版,企业版-10

Windows 7 Home Starter -1

Windows 7基本版-1

Windows 7专业版-3

Windows 7 Ultimate,Professional,Enterprise-10

Windows Vista Home Basic(仅IIS进程激活和HTTP处理)-3

Windows Vista家庭高级版-3

Windows Vista Ultimate,专业版,企业版-10

Windows Server 2003,Windows Server 2008,Windows Server 2008 R2和Windows

Server 2012允许无限数量的同时请求。*

现在,我想强制signalR使用长轮询连接,以克服IIS的限制。有什么方法可以强制连接吗?

Erk*_*rel 5

是的你可以。

connection.start({ transport: 'longPolling' });
Run Code Online (Sandbox Code Playgroud)

选中“ 指定运输”

另外,我建议您使用SignalR Self-Host,因为OWIN,它不使用IIS限制。

检查这里。

  • 是否可以指定轮询间隔? (2认同)