I am using Windows 8 with IIS8 and MVC4 to establish a websocketconnection. This works fine with Firefox, IE10 and Chrome. Safari still wont let me establish a websocketconnection. My Handlercode looks like this:
<!-- language: c# -->
public void ProcessRequest(HttpContext context)
{
if (context.IsWebSocketRequest)
{
Client client = new Client();
context.AcceptWebSocketRequest(client.HoldConnection);
}
}
The Problem is that context.IsWebSocketRequest is always false, while conntecting via Safari. My JavaScript code is a simple this.socket = new WebSocket(window.WebSocketUrl);
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…