简体   繁体   中英

SignalR can't connect to hub when using Azure Service Bus backplane

I downloaded the SignalR Getting Started solution and it works well. However if I add Azure Service Bus backplane then the client can't connect any more.

First it tries to connect to WebSocket

SCRIPT12030: WebSocket Error: Network Error 12030, The connection with the server was terminated abnormally

Then falls back to long polling and it doesn't work either.

SCRIPT7002: XMLHttpRequest: Network Error 0x2eff, Could not complete the operation due to error 00002eff.

Running it locally, debugging and there is no exception thrown on the server side.

The only difference between the working and non-working status is in the Startup.cs if I comment out the UseServiceBus part then it works:

//GlobalHost.DependencyResolver.UseServiceBus(connectionString, "Blabla"); 
app.MapSignalR();

Obviously I can't leave it like this for Azure deployment.

I tried upgrading / downgrading packages, both SignalR and WindowsAzure.ServiceBus , all the same.

Any ideas?

I have the same error, i have seen that the response for https://localhost/signalr/connect?transport=webSockets .... is 400 the problem is that my service bus Pricing plan is basic but only Standard tire to support Topics. So you have to go to azure portal and under the "Pricing tire" section of service bus you have to specifically go to the settings and scaled it up from Basic to Standard.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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