I’m working on an ASP.NET MVC web application and I’ve made my own authentication module, which is session-based (no cookies). The problem is: When I rebuild my application, I’m automatically logged of (session is empty).
Normally this is not a big problem because my application is not ‘automatically’ rebuilding in a production environment. But I’ve also made a module that changes the resource-files and after a modification of a resource file, the application seems to rebuild automatically.
So my actual question: Is it possible to ‘keep’ the session variables/stay logged on after a rebuild?
You’ll need to use something other than InProc sessions. You’ll need to look at using either ASP.net State Server, or a SQL server as the backing store for your sessions. These can be a bit slower, but are more resilient.