I am working on an ASP.NET MVC web application and I have created my own authentication module which is session based (without cookies). The problem is this: when I rebuild the application, I automatically register (the session is empty).
This is usually not a big problem because my application does not "automatically" rebuild in the production environment. But I also created a module that modifies resource files and after modifying the resource file, the application seems to be automatically rebuilt.
So, my real question is: is it possible to “save” session variables / stay enabled after recovery?
You will need to use something other than InProc sessions. You will need to use the ASP.net State Server or SQL Server as the backup storage for your sessions. They may be slightly slower, but more stable.
As Paddy notes, you will need to use something other than InProc sessions. Go to MSDN to find out how to change your SQL or Windows Service solution.
, , . , ASP.NET , , , - ( InProc - , , , , ).