Ideally, a session in ASP should store the least amount of data that you can get rid of. Saving a link to any object that stores system resources (in particular, connecting to a database) is a definable scalable killer. Also, storing unfixed data in a session variable is just a bad idea in most cases. Overall, it seems that the current implementation is abusively using session objects to try to simulate a stateful application in a supposedly stagnant environment.
Despite the fact that he is very slanderous, the ASP.NET control model automatically through hidden fields should really eliminate most of the need to store something in session variables.
My rule of thumb is that the more scalable (in terms of users / hits) an application should be, the less you can avoid using session state. However, there is a compromise. For web applications, where the user repeatedly accesses the same data and usually has a rather long session for each use of the site, some caching (if necessary, in session objects) can actually help scalability by reducing the load on the database server. The idea here is that it is much cheaper and less difficult to process the presentation level than the base database. Of course, with all things, this advice should be taken moderately and not applied in all situations, but for a fairly simple internal CRUD application, it should serve you well.
Johnfx
source share