SignalR ping prevention

I have used SignalR

in my application to update some parts based on server transfer from Hub

.

But here I am getting some problem that every 5 minutes interval Client pings

to connect. This causes the data to disappear. I don't want to use this SignalR Ping

one because I am already passing server side to all clients using code ::

Clients.All.BroadcastNewsCount(ValidNewsCount, SelectedCompany, TypeOfOperation);

      

Below is a screenshot of Ping :: enter image description here

+3


source to share


1 answer


The purpose of the / ping request is to save ASP.NET sessions. If you don't need this feature, you can disable ping by setting pingInterval

to null in your call to $ .connection.hub.start like this:



// Disable SignalR pings
$.connection.hub.start({ pingInterval: null })//...

      

+9


source







All Articles