If you need session state, enable session state. It is so simple.
However, if all you need is just a few (lite) session variables, you can get rid of cookies and pass data back and forth for each request.
You can also try to “override” the state of the session using something like:
static class Globals { private static Dictionary<string, MySessionObjectType> sessions; public static MySessionObjectType GetSessionData(string SessionID){...} public static void SetSessionData (string SessionID, MySessionObjectType sessionData){...} }
This, of course, does not scale for multiple web servers, and session timeout management will be PITA.
Do not forget that the nature of the website itself does not have a status, so using too much state (either on the server or on the client) is not always a wise choice.
Sweko source share