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

时间:2016-04-19 11:36:40

标签: c# signalr

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

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

IIS并发请求限制

  

Windows 8(基础版) - 3

     

Windows 8 Professional,Enterprise - 10

     

Windows 7 Home Starter -1

     

Windows 7 Basic - 1

     

Windows 7 Premium - 3

     

Windows 7 Ultimate,Professional,Enterprise - 10

     

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

     

Windows Vista Home Premium - 3

     

Windows Vista Ultimate,Professional,Enterprise - 10

     

Windows Server 2003,Windows Server 2008,Windows Server 2008 R2和   视窗

     

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

现在我想强制signalR使用Long Polling连接以克服IIS限制。有没有办法强制连接方法?

1 个答案:

答案 0 :(得分:4)

是的,你可以。

04-19 17:43:40.374 30949-30949/com.example.riche.flip_final D/flip: 1
04-19 17:43:40.388 30949-30949/com.example.riche.flip_final D/flip: 2
04-19 17:43:41.386 30949-30949/com.example.riche.flip_final 
I/Choreographer:Skipped 61 frames!  The application may be doing too 
much work on its main thread.
04-19 17:43:44.539 30949-30949/com.example.riche.flip_final D/flip: 3
04-19 17:43:44.560 30949-30949/com.example.riche.flip_
final W/FragmentManager: moveToState: Fragment state for Steps_Fragment{33bf8e3 #2 id=0x7f0d0075} not updated inline; expected state 3 found 2
04-19 17:43:46.999 30949-30949/com.example.riche.flip_final D/flip: 1
04-19 17:43:47.008 30949-30949/com.example.riche.flip_final  W/FragmentManager: moveToState: Fragment state for Calorie_Fragment{208d45e #1  id=0x7f0d0075} not updated inline; expected state 3 found 2
04-19 17:43:48.105 30949-30949/com.example.riche.flip_final D/flip: 3
04-19 17:43:48.115 30949-30949/com.example.riche.flip_final W/FragmentManager: moveToState: Fragment state for Steps_Fragment{fd45d27 #2  id=0x7f0d0075} not updated inline; expected state 3 found 2

检查Specifying a transport

另外,我建议您使用因{OWIN而未使用IIS限制的SignalR Self-Host

点击also