Avatar of mmexchange
mmexchange asked on

Saving session information

These two articals on saving session variables/state are really good:

Handling ASP.NET Session Variables Efficiently
http://codeforeternity.com/blogs/technology/archive/2007/12/19/handling-asp-net-session-variables-efficiently.aspx

How to wrap the ASP.net session state
http://startbigthinksmall.wordpress.com/2008/05/14/how-to-wrap-the-aspnet-session-state/

My question: if there are session related items/variable/objects/etc that are unique to the session, is this the best way (or only way) to do that? (I don't want to use cookies or anything on the client side).
Web DevelopmentWeb Applications

Avatar of undefined
Last Comment
ahoffmann

8/22/2022 - Mon
fahadsadah

You would have to store something on the client side.
ahoffmann

i.g. it's bad practice to trust the client, hence I'd never store something on the client
In practice this includes a cookie too (which would point to the session store on the server somehow), unfortunatelly ...
So the questions is: is there something valuable why you cannot use cookies (beside the user's privarcy which nobody cares about ..)? Does your site server something valuable?
If not, cookies would be the simplest way.
If security counts, url-rewriting or form variables are better, but much more compilcated to implement in a save way.
ASKER
mmexchange

I don't want to save anything on the client side ... guess the saving to a session variable is the best way to do this.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
fahadsadah

Of which an identifier would have to be propagated... on the client side!!!
ASKER
mmexchange

What does this mean? "Of which an identifier would have to be propagated... on the client side!!!"
The Web app already knows the session variables, what does the client side need to know? (other than the necessary HTML code for the page?) I'm just asking about how to keep the server side information stored between postbacks ...
SOLUTION
fahadsadah

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER CERTIFIED SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.