.Net Core SignalR - connection timeout - heartbeat timer - connection state change handling

This is an issue when running SignalR Core behind IIS. IIS will close idle connections after 2 minutes. The long term plan is to add keep alive messages which, as a side effect, will prevent IIS from closing the connection. To work around the problem for now you can:

  • send periodically a message to the clients
  • change the idle-timeout setting in IIS as described here
  • restart the connection on the client side if it gets closed
  • use a different transport (e.g. long polling since you cannot use webSockets on Win7/Win2008 R2 behind IIS)