3

I have an asp.net core web application deployed on Azure App Service, the problem is that every time I publish changes to the server, (no matter if it's via vs publish or via vs team services ci) the users sessions expires and every user has to login again.

How can I avoid this? Thanks for your help.

alecardv
  • 922
  • 1
  • 12
  • 24

1 Answers1

1

Everytime you publish build your AppDomain recycled, so session state will be changed and expired. You can read in details in this question Losing Session State

  • If you want to keep your user logged-in after build, maybe use another technique. Like Access Tokens for example.

Read more from here

https://samueleresca.net/2016/12/developing-token-authentication-using-asp-net-core/ https://dotnetthoughts.net/token-based-authentication-in-aspnet-core/

Ahmed
  • 1,542
  • 2
  • 13
  • 21