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

How to wrap the ASP.net 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

8/22/2022 - Mon

You would have to store something on the client side.

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.

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

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

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 ...

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
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
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.