无法与Azure上托管的WebSocket服务器通信 [英] Can't communicate with WebSocket server hosted on Azure

查看:94
本文介绍了无法与Azure上托管的WebSocket服务器通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!



我最近在Azure上托管了我的.NET Core WebSocket服务器,但我无法与之通信它来自任何客户。


我曾经在"wss://127.0.0.1:8080"上本地托管它。使用自签名的ssl证书并且一切正常,我还使用SAP Hana Cockpit(使用Cloud Foundry api)托管它,如果在"http://0.0.0.0:8080"和
I上启动它通过"wss:// ADDRESSWITHOUTPORT"访问两者来自我的角度客户端,并且都工作正常。


当我在Azure上托管它并尝试从客户端使用它时,它给了我意外的响应消息200(WebSockets甚至没有那个错误,iirc),更改端口/地址/协议似乎什么都不做。


我该怎么办?


如果有用的话,这是我的项目https://github.com/JamesMaloney/WebSocketServer.NET


提前致谢,威廉

解决方案

嘿威廉,


我不是网络套接字的专家,但我确实遇到过可能会有所帮助同样。


如果我能提供进一步帮助,请告诉我。


Hi everyone!

I have recently hosted my .NET Core WebSocket server on Azure but I can't communicate with it from any client at all.

I used to host it locally on "wss://127.0.0.1:8080" using a self signed ssl certificate and everything worked fine, I also hosted it using SAP Hana Cockpit (uses Cloud Foundry api) and it worked if started on "http://0.0.0.0:8080", and I accessed both via "wss://ADDRESSWITHOUTPORT" from my angular client and both work fine.

When I host it on Azure and try to use it from client, it gives me Unexpected Response Message 200 (WebSockets don't even have that error, iirc), changing port/address/protocol doesn't seem to do anything at all.

What should I do?

If it's useful, this is my project https://github.com/JamesMaloney/WebSocketServer.NET

Thanks in advance, William

解决方案

Hey William,

I'm no expert on web sockets but I did come across this stack question that recommends changing your firewall settings to accept tcp over port 80 (or 8080) rather than http. Also, you didn't mention this but I'm assuming you enabled web sockets on your App Service blade > Configuration > General Settings.

I do know that SignalR was recenlty released to enable communciation across web sockets. This may be helpful as well.

Let me know if I can provided further assistance.


这篇关于无法与Azure上托管的WebSocket服务器通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆