HTTP Modules and Synchronistic Session States?
Currently, we have an ASP.NET 1.1 application where there exists several
"sections". We are upgrading the application to .NET 2.0 and want to
seperate these sections into individual VS projects (05) and virtual
directories (i.e. Domain.com/Section1, Domain.com/Section2, etc). This would
allow us to develop / deploy the modules without worrying about affecting the
other sections (i.e. cannot move Section 1 code changes until Section 2 has
been tested and signed of on b/c they are all built within the same dll).
The problem is tracking the Session context b/t the different sections
without duplicating data/objects within the various Sessions.
We want Session singularity with performance in mind.
I have a method on how to implement this functionality but wanted your
ideas/opinions.
My proposal is:
Track the Session information in a common SQL Server 05 table.
Implement a Redirect page that:
- Saves the Session key/value pairs to the DB
- "Garbage collect" the current Session context (i.e. Session.Clear()) to
stop duplication
- Redirects passing a sessid URL parameter (or setting a cookie value) to
the other section
The Page_Init method in a base Page class would check for this sessid
Request param (or cookie value) and load the Session Context from the DB.
What do yall think?
Have a fun and safe 4th!!!
Best regards,
Alex
Date:Tue, 3 Jul 2007 07:44:03 -0700
Author:
|