Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I really want to get away from using cookies and would prefer to use session variables. I have a website that at most would have 1000 to 1200 concurrent users and I would like to store certain information about the user in session variables. Specifically the information would be small like username, password, companyid, groupid etc... How expensive would this be?

 

 

Also, this may be a really really stupid question but can you store a class instance in a session variable and have access to all of it's fields and methods? For example, if I wanted to keep a running total of all the transactions performed by user x then in a desktop app I could simply

classinstance.runningtotal += classinstance.transaction. Like I said this could be a ridiculous question but why not ask?

Posted
Depends on your server's resources. Is it a shared plan or dedicated server? Is your state server in process or in a db? What's wrong with using cookies?

 

 

It is a dedicated server. I don't know state server then it would be whatever it default's to. I would like to limit what i put on the client machine. It's just a personal preference that the more I can control the better I like. I do have several js scripts that I run but I don't know of an alternative for that with cookies however my hope was that a session variable would be a reasonable alternative.

Posted
Well consider if you have 1200 users, each taking up a few KB of memory. Figure what your server can do, how much RAM, what services this dedicated server is responsible for. Most importantly, be careful with what you put into your session variables if performance is an issue. I know that my server wouldnt be able to do that :p
Posted
Well consider if you have 1200 users' date=' each taking up a few KB of memory. Figure what your server can do, how much RAM, what services this dedicated server is responsible for. Most importantly, be careful with what you put into your session variables if performance is an issue. I know that my server wouldnt be able to do that :p[/quote']

 

 

I guess it's like most things if I want more "control" then I'm going to have to give up something. Maybe cookies aren't so bad but then again........

Posted
You do realize sessions use cookies right?

Uhh No I didn't. So if the users browser doesn't have cookies enabled then the session variables won't work.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...