admin管理员组

文章数量:1384985

I have already written my web socket client program which runs successfully in Firefox and Chrome. But I also have the requirement to make it work in IE 10. When I execute my program it gives me Security Error's.

I tried to investigate and I found that it's due to the number of connections I make in code is more then expected. Expected are 6 connections for IE 10. I can't reduce the number of connections as I have different sets of URL to be called.

Here it is how I make the connection:

var WS_serverstatus = window['MozWebSocket'] ? MozWebSocket : WebSocket
var svrstate=new WS_serverstatus("ws://"+'@{ play.Play.application().configuration().getString("engine.host") }'+":"+'@{ play.Play.application().configuration().getString("engine.port") }'+"/services/reports/v1/realtimestreaming/serverStatus")

I have already written my web socket client program which runs successfully in Firefox and Chrome. But I also have the requirement to make it work in IE 10. When I execute my program it gives me Security Error's.

I tried to investigate and I found that it's due to the number of connections I make in code is more then expected. Expected are 6 connections for IE 10. I can't reduce the number of connections as I have different sets of URL to be called.

Here it is how I make the connection:

var WS_serverstatus = window['MozWebSocket'] ? MozWebSocket : WebSocket
var svrstate=new WS_serverstatus("ws://"+'@{ play.Play.application().configuration().getString("engine.host") }'+":"+'@{ play.Play.application().configuration().getString("engine.port") }'+"/services/reports/v1/realtimestreaming/serverStatus")
Share Improve this question edited Jun 2, 2015 at 9:03 M.M 142k25 gold badges220 silver badges391 bronze badges asked Nov 24, 2013 at 8:13 SohanSohan 6,8396 gold badges40 silver badges58 bronze badges 1
  • Here's how signalr handles the issue: github./SignalR/SignalR/issues/1744 – megawac Commented Nov 24, 2013 at 8:39
Add a ment  | 

2 Answers 2

Reset to default 6

Apparently, this limit can only be fixed by changing a setting in the Windows registry:

Internet Explorer 10. When enabled, the FEATURE_WEBSOCKET_MAXCONNECTIONSPERSERVER feature sets the maximum number of concurrent WebSocket connections allowed to a single host. The minimum number that can be specified is 2 and the maximum value allowed is 128.

The default value for this setting is 6 in Internet Explorer and applications hosting the WebBrowser Control. To modify this feature by using the registry, add the name of your executable file to the following setting.

...

(link)

But it is suggested here that you could circumvent the limit by using a bunch of subdomains which all point to the same server.

By looking at "Sohans" ment I though I should add this enhancement to "robertklep" answer.

  • If you cannot find the "FEATURE_WEBSOCKET_MAXCONNECTIONSPERSERVER" registry entry you have to add this entry to the registry. Futher do not get confused with contoso.exe (that's what I got wrong) in the given link it has to be iexplore.exe.

I have attache the following image to eliminate all guess work.

本文标签: javascriptHow to increase number of simultaneous websockets in IE 10Stack Overflow