2
votes

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

Then I followed the tutorial of SignalR Scaleout with Azure Service Bus, also from Microsoft.

So I have completed all the following steps:

  • Created a new Cloud Service on Azure Portal
  • Created a new Service Bus namespace on Azure Portal
  • Created a Windows Azure Cloud Service with a SignalR ASP.NET Web Role
  • Setup the SignalR Web Role running on 2 instances (VM Size: Small)
  • Deployed the Cloud Service to the Azure Cloud Service.

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

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 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

and this is the log in the Network:

error

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

1
Please show us the the relevant code of the application - Create a Minimal, Complete and Verifiable Example.radu-matei
@radu-matei, the relevant code is in the linked tutorial. That is the minimal, complete and verifiable example.Bolu
Open the developer console and check what is being logged and what requests are being sent and if they are successful. I remember that when I tried to use ServiceBus I misconfigured ServiceBus in the portal and nothing worked.Pawel
The problem is on the server side. Run/Debug your server locally connecting to service bus and see what exception you have and take it from there.Pawel
@Pawel, Debugged locally with the Messaging With Topics sample. It turns out to be that my service bus is on "Basic" message tire (Although I created it with the Standard Price tire). I scaled it up to Standard and it works now. Many thanks!!Bolu

1 Answers

2
votes

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.