Continuous Deployment with an ASP.NET website?
.net, asp.net, c#, continuous-deployment, session-state
Solution
If you make a change to a config file, the contents of a bin folder of the app, or things like that, the ASP.NET worker process restarts along with your application.
This results in deleted sessions and kicked-out users.
The solution is to use other session storage methods other than the default `InProc`. You can achieve this by setting the session state mode. The `SqlServer` and `StateServer` options provide very good remedy for your issue.
`SqlServer` mode is relatively easy to set up and get up and running. (Basically, it's just creating a database, running aspnet_regsql, and then specifying it to the config.) If you don't have MS SQL Server or don't want to use it, you can use `StateServer`, or create your own provider and use the `Custom` mode.
The only restriction is that you can only store serializable values with `SqlServer` and `StateServer` mode.
Problem
I have a website in C#/ASP.NET that is currently in development. When we are in production, I would like to do releases frequently over the course of the day, as we fix bugs and add features (like this: http://toni.org/2010/05/19/in-praise-of-continuous-deployment-the-wordpress-com-story/). If you upload a new version of the site or even change a single file, it kicks out the users that are currently logged in and makes them start over any forms and such. Is there a secret to being able to do deployments without interfering with users for .NET sites?