简体   繁体   English

使用Azure Service Bus背板时SignalR无法连接到集线器

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

I downloaded the SignalR Getting Started solution and it works well. 我下载了SignalR入门解决方案 ,它运行良好。 However if I add Azure Service Bus backplane then the client can't connect any more. 但是,如果我添加Azure Service Bus背板,则客户端将无法再连接。

First it tries to connect to WebSocket 首先,它尝试连接到WebSocket

SCRIPT12030: WebSocket Error: Network Error 12030, The connection with the server was terminated abnormally SCRIPT12030:WebSocket错误:网络错误12030,与服务器的连接异常终止

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. SCRIPT7002:XMLHttpRequest:网络错误0x2eff,由于错误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: 如果我注释掉UseServiceBus部分,则工作状态和非工作状态之间的唯一区别是在Startup.cs中,然后它可以工作:

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

Obviously I can't leave it like this for Azure deployment. 显然,我不能像这样将其留给Azure部署。

I tried upgrading / downgrading packages, both SignalR and WindowsAzure.ServiceBus , all the same. 我尝试升级/降级SignalRWindowsAzure.ServiceBus包,都一样。

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. 我有同样的错误,我已经看到https:// localhost / signalr / connect?transport = webSockets ....的响应是400问题是我的服务总线定价计划是基本的,但仅标准轮胎支持主题。 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. 因此,您必须转到azure门户,在服务总线的“定价轮胎”部分下,您必须专门转到设置并将其从“基本”扩展为“标准”。

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

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