Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP Session

Status
Not open for further replies.

PepperPepsi

Programmer
Aug 3, 2000
241
US
Hi guys..

I'm currently working on a project that need to use Session to store the variables. The problem is i will need to create about 30+ sessions in the application, and most of them should keep exists as long as the user still log in the system. My question is will it slow down the server? There will be approximately 5,000 users running the application every hour.

What i'm thinking to do is have some session store in the hidden filed and recreate the session when i need it. Or is there any other good way to deal with this?

thanks [sig]<p>Chiu Chan<br><a href=mailto:cchan@gefmus.com>cchan@gefmus.com</a><br><a href= America, Inc</a><br>[/sig]
 
Some ideas that come to mind...

If any of the session variables are the same across all users, use application variables instead.

If the session variables are complex use an SQL database to hold the data.

If the session variables are relatively simple you could either use client cookies (which have to be enabled for session variables to work anyway) or use one single variable that holds all the information. Either an array (slightly more memory intensive) or a parsed string (ex. data 1|data 2 |data 3| etc. - slightly more code intensive).

You could indeed keep a hidden form going across all pages with all the info (the parsed string idea would work well here) but, if you have a lot of pages, this can be very cumbersome.

Later, [sig]<p>Rob<br><a href=mailto:robschultz@yahoo.com>robschultz@yahoo.com</a><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
"Focus on the solution to the problem,<br>
not the obstacles in the way."<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[/sig]
 
Rob,

thanks for your sugguestions.
by the way, does anyone know how to keep the Session alive?
i know you can specified the timeout period. Like (Session.Timeout = min) but what happen if i want to keep the session for 10+ hours or forever as long as their browser still open.

thanks

[sig]<p>Chiu Chan<br><a href=mailto:cchan@gefmus.com>cchan@gefmus.com</a><br><a href= America, Inc</a><br>[/sig]
 
If you want to keep information for such a long period of time, you should really consider using cookies then. You can also set the expiration time. HTH
 
First off don't use an array for a session var... it can cause a gpf on the server.
Second in iis 5 a session can only stay open for 24 hours...
If you need information to be active aslong as the browser is open pass the info in cookies, or a database, or if needs be the hidden form you were thinking of at the start of this thread....
Chad
tinman@thelandofoz.org

Tinman,

Welcome to OZ.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top