简体   繁体   English

Windows Azure Node JS WEBSOCKET HandShake 失败 503 错误

[英]Windows Azure Node JS WEBSOCKET HandShake Fails 503 Error

I've deployed my nodeJS server in windows azure.我已经在 windows azure 中部署了我的 nodeJS 服务器。 My client fails while connecting to server and handle the following error :我的客户端在连接到服务器时失败并处理以下错误:

WebSocket connection to 'wss://ooplrfrfranode.azurewebsites.net/socket.io/1/websocket/lHrd-DOydinODjbS7-tc' failed: Error during WebSocket handshake: Unexpected response code: 503.

Any Help please.请任何帮助。 Thanks.谢谢。

Windows Azure Web Sites has recently added support for the WebSocket protocol. Windows Azure 网站最近添加了对 WebSocket 协议的支持。 Both .NET developers and node.js developers can now enable and use WebSockets in their applications. .NET 开发人员和 node.js 开发人员现在都可以在他们的应用程序中启用和使用 WebSockets。

There is a new option on a web site's Configuration tab to enable WebSockets support for an application.网站的配置选项卡上有一个新选项可以为应用程序启用 WebSockets 支持。

在此处输入图片说明

Source: http://azure.microsoft.com/blog/2013/11/14/introduction-to-websockets-on-windows-azure-web-sites/来源: http : //azure.microsoft.com/blog/2013/11/14/introduction-to-websockets-on-windows-azure-web-sites/

For students struggling with socket.io on Azure对于在 Azure 上使用 socket.io 苦苦挣扎的学生

I've struggled for 2 days with this.我已经为此挣扎了2天。 I was using a student free tier for the service app and apparently that was part of the problem.我正在为服务应用程序使用学生免费套餐,显然这是问题的一部分。

I made a B1 plan app service with my student credits.我用我的学生学分做了一个B1 plan应用程序服务。 After uploading my node.js app it worked out of the box.上传我的 node.js 应用程序后,它开箱即用。

After that, I downscaled it to a free tier and it still works now(fingers crossed).在那之后,我将它缩小到一个免费层,它现在仍然有效(手指交叉)。 This might help for students struggling with socket io on azure.这可能对在 azure 上使用 socket io 苦苦挣扎的学生有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM