Visual Studio asp.net will publish: does it delete current online users

Using VS2008sp1: trying to find a reliable way (or the right way) to update a running web application (ASP.NET 3.5sp1) without losing current user sessions / context.

I know that users can receive a busy message at the time of publication, which is normal. Question: Does IIS reset sessions? or lose any context current users are in? Could this be phased? or I can customize my architecture to help with this.

My only current solution now is to do it "after", but as soon as its 24x7 - when is it ?;)

+3
source share
1 answer

Whenever you update a web application, the application domain terminates and a new one starts, so if you do not save the user state elsewhere, your users will lose their session state.

A few ways you can fix this:

  • Keep user session outside the process (may be a database). As long as this state is stored somewhere, you can restore the state of the user from the web application itself when the application returns.

  • Do not save state / session values ​​anywhere except possibly a cookie or querystring. Thus, no state is lost when you restart the application.

+6
source

Source: https://habr.com/ru/post/1725350/


All Articles