SignalR package (Microsoft.AspNet.SignalR) not working on Umbraco Cloud (Error WebSocket connection failed)
I have used SignalR package (Microsoft.AspNet.SignalR) in the project for real time messages, and it is working fine at local end on IIS and IIS
Express but after deployed on umbraco cloud its not working. Here is the error: WebSocket connection to 'wss://example.com failed.(Websocket failed to connect.)
After searching on the internet I found there is setting on the IIS for web socket, that should be enable.
Umbrco cloud said SignalR not supported but Websocket supported on Umbraco cloud.
But in my case it is throwing error on browser console (Websocket connection faild)
If we reduce timeout to 1 then it is connecting in 10 to 15 seconds. But it is still long time. This is only Umbraco cloud issue. SignalR working fine with all other live server (AWS, Godaddy, Local Server, Azure server).
No one faced this issue before or not any help. I am trying to fix it myself.
SignalR package (Microsoft.AspNet.SignalR) not working on Umbraco Cloud (Error WebSocket connection failed)
I have used SignalR package (Microsoft.AspNet.SignalR) in the project for real time messages, and it is working fine at local end on IIS and IIS Express but after deployed on umbraco cloud its not working. Here is the error: WebSocket connection to 'wss://example.com failed.(Websocket failed to connect.) After searching on the internet I found there is setting on the IIS for web socket, that should be enable.
Umbrco cloud said SignalR not supported but Websocket supported on Umbraco cloud.
But in my case it is throwing error on browser console (Websocket connection faild)
Any suggestion what should I do on umbraco cloud?
Any one has faced this issue before or any idea?
Thanks.
I have solved the issue with hub connection. Actually it was disconnected automatically. So I added code:
$.connection.hub.disconnected(function () {
setTimeout(function () { $.connection.hub.start(); }, 5000); });
Now connection is creating but it is taking 30 to 50 seconds to create the connection. It is too long.
If any suggestion to reduce the connection creating time, please suggest.
If we reduce timeout to 1 then it is connecting in 10 to 15 seconds. But it is still long time. This is only Umbraco cloud issue. SignalR working fine with all other live server (AWS, Godaddy, Local Server, Azure server).
No one faced this issue before or not any help. I am trying to fix it myself.
$.connection.hub.start({ transport: "longPolling", function() { console.log('Connection hub started!'); } })
(Error WebSocket connection failed) This issue will not come if you add -: transport: "longPolling"
Hi,
there is quite a lot going on with SignalR on Umbraco cloud as a couple of the internal tools also use it (e.g Umbraco.Deploy).
I have found you have to do things in a very specific order, and check to see other things haven't also started SignalR in your code
the basics of this are in this repo: https://github.com/KevinJump/DoStuffWithUmbraco/blob/v8/Src/DoStuff.Core/App_Plugins/DoStuff.SignalR/signalRHub.js
this has some of the check to see if its already there logic in it, which i think gets around most of the problems.
is working on a reply...