带有服务总线的SignalR Azure云服务 [英] SignalR Azure Cloud Service with Service Bus

查看:92
本文介绍了带有服务总线的SignalR Azure云服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用SignalR在

I have built a simple Chat application using SignalR followed the tutorial there, which works great.

然后,我按照 SignalR的教程进行操作也可以从Microsoft使用Azure Service Bus进行横向扩展.

所以我已经完成了以下所有步骤:

So I have completed all the following steps:

  • 在Azure门户上创建新的云服务
  • 在Azure门户上创建新的服务总线命名空间
  • 使用SignalR ASP.NET Web角色创建Windows Azure云服务
  • 设置在2个实例(VM大小:小型)上运行的SignalR Web角色
  • 将云服务部署到Azure云服务.

但是我无法使SignalR Chat应用程序正常工作.无法启动集线器.

But I can't get the SignalR Chat application to work. Can't start the hub.

我注意到它试图使用longPolling并在浏览器的调试工具(Chrome)中显示已取消/中止"状态,并在控制台中显示以下错误:

I noticed it tried to use longPolling and shows status Cancelled/Abort in the browser's debugging tool (Chrome) with the following error in the console:

WebSocket连接到WS://example.cloudapp.net/signalr/connect运输=&的WebSockets放大器; clientProtocol = 1.5&安培; connectionToken = KOlz9psd6yCqvYjmCbI3ch5mrXcP%2BAAl3JVMFaP24p2Cv%2FyRb94D5uE27SO9Bz%2B5Itba4vADtv3%2Btv2FMF9LJI6Zxr026UJYxDPNQMVpFTw2hiHd&安培; connectionData =%5B%7B%22name? %22%3A%22schathub%22%7D%5D& tid = 10'失败:WebSocket握手时出错:意外的响应代码:400

WebSocket connection to 'ws://example.cloudapp.net/signalr/connect?transport=webSockets&clientProtocol=1.5&connectionToken=KOlz9psd6yCqvYjmCbI3ch5mrXcP%2BAAl3JVMFaP24p2Cv%2FyRb94D5uE27SO9Bz%2B5Itba4vADtv3%2Btv2FMF9LJI6Zxr026UJYxDPNQMVpFTw2hiHd&connectionData=%5B%7B%22name%22%3A%22schathub%22%7D%5D&tid=10' failed: Error during WebSocket handshake: Unexpected response code: 400

这是网络中的日志:

除了本教程中列出的所有步骤之外,我还需要做其他事情吗?

Do I need to do anything extra besides all the steps listed in the tutorial to make this work?

推荐答案

基于

Based on the current Pricing, you need to set the Service bus to at least Standard tier to support Topics.

在这种情况下,我确实选择了标准层来创建我的服务总线,尽管它在定价层"部分的概述"页面上显示了标准",但我必须专门进行设置并将其从基本"扩展到标准".哪个解决了问题.

In this case, I did create my service bus choosing Standard tier, although it shows Standard on it's Overview page under the "Pricing tier" section, I have to specifically go to the settings and scaled it up from Basic to Standard. Which has solved the problem.

这篇关于带有服务总线的SignalR Azure云服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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