2

I have used SignalR in my application for refreshing some portions based on Server broadcast from Hub.

But here I am getting some problem that on every 5 mins of interval Client pings for connection. That causes data disappearence. I dont want to use this SignalR Ping, because i am already broadcasting on server side to all clients using code::

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

Below is the screen shot of the Ping:: enter image description here

pnuts
  • 58,317
  • 11
  • 87
  • 139
Rahul
  • 2,309
  • 6
  • 33
  • 60

1 Answers1

11

The purpose of the /ping request is to keep ASP.NET sessions alive. If you don't need this functionality you can disable the pings by setting pingInterval to null in your call to $.connection.hub.start like so:

// Disable SignalR pings
$.connection.hub.start({ pingInterval: null })//...
halter73
  • 15,059
  • 3
  • 49
  • 60
  • I have tried this but still signalR pings on 5 minutes interval – Rahul Sep 03 '14 at 08:37
  • 1
    Are you sure that it is your app pinging on the 5 minute interval and not [Browser Link](http://blogs.msdn.com/b/webdev/archive/2013/06/28/browser-link-feature-in-visual-studio-preview-2013.aspx) which uses SignalR under the covers? The link I provided explains how you can disable the feature. – halter73 Sep 03 '14 at 17:37
  • It worked!! Problem was on my side that I am using signalR at more than one place. @halter73 Thanks!! – Rahul Sep 04 '14 at 06:07