Last post Nov 12, 2013 07:09 AM by p.przebieracz
Nov 12, 2013 07:09 AM|p.przebieracz|LINK
I'm facing a problem when deploying MVC application with SignalR to IIS (IIS 8.0.9200.16384, Windows Server 2012). I use Octopus Deploy that simply uploads new version of application and switches physical site path to folder with new version. The problem
with this approach is that all active SignalR connections (WebSockets) are not dropped and remain alive after the deployment.
I would like to deploy a new version of my application and use SignalR channel to inform all users that new version has just been deployed and in order to use it page refresh is required. Right now it is impossible because users that were logged in during
deployment will still have old SignalR connections active and will not receive messages pushed from the new version of application. Old SignalR hub ends its lifetime after last user closes its connection.
Is there a way i could force those old SignalR connections to reconnect after deploying new version of my application? It could be done by simply stopping the old version before running the new one (instead of only switching the folder path) but I don't
want to kill any ongoing requests in the old application. I want users to know that there is a new version and ask them to refresh the page. If they don't, most features will still work so it's not mandatory to refresh. In case of SingalR however i need to
enforce that all users are using the same SignalR hub. Any ideas how this should be done?