问题
I am have created a C++ web socket server. I am trying to access it from IE 11 using web socket Javascript API. I am trying to connect to localhost.
function JSInit() {
try {
var host = "ws://127.0.0.1:25000/test";
remoteEngine = new WebSocket(host);
remoteEngine.onopen = onWebSocketOpen;
remoteEngine.onmessage = onRecvMessage;
remoteEngine.onclose = onWebSocketClose;
remoteEngine.onclose = onWebSocketError;
}
catch (err) {
alert(err.message);
}
}
Is there in any restriction on accessing ?Anyway to allow access to it.
回答1:
Localhost loop back is not allowed in IE 11 on Window 8 onwards
http://blogs.msdn.com/b/ieinternals/archive/2012/03/23/understanding-ie10-enhanced-protected-mode-network-security-addons-cookies-metro-desktop.aspx
回答2:
Please add the website to the zone of trusted sites at IE | Tools | Internet Options | Security and try again.
来源:https://stackoverflow.com/questions/19979870/web-socket-client-connection-issue-in-windows-8-1-ie-11-loopback-not-allowed