Home arrow ASP arrow Page 4 - When Session Variables Go Bad
ASP

When Session Variables Go Bad


Are session variables a bad thing in ASP? In this article Bruce examines the pro's and con's of session variables and provides suggestions that you can apply to your own ASP apps.

Author Info:
By: Bruce Johnson
Rating: 5 stars5 stars5 stars5 stars5 stars / 46
November 28, 2002
TABLE OF CONTENTS:
  1. · When Session Variables Go Bad
  2. · The Implementation Details
  3. · Cap'n. The Resources. They Canna Take It!
  4. · Conclusion

print this article
SEARCH DEVARTICLES

When Session Variables Go Bad - Conclusion
(Page 4 of 4 )

So what have we learned from all of this. First, it is not a good idea to store STA objects in the Session variables. You might get away with it on a low volume site, but if you do run into strange problems, be aware that the problem could be causes by STA objects. And, unfortunately, the most common objects used by ASP developers use the STA architecture, namely ADO and FileSystemObjects.

So what have we learned from all of this. First, it is not a good idea to store STA objects in the Session variables. You might get away with it on a low volume site, but if you do run into strange problems, be aware that the problem could be causes by STA objects. And, unfortunately, the most common objects used by ASP developers use the STA architecture, namely ADO and FileSystemObjects.

Second, if you do use Session variables, be aware of how much information is actually being stored. Especially if you have a heavily trafficked site, make sure that you adjust your memory (both physical and virtual) accordingly.

Finally, if you move to a distributed web server environment, the use of Session variables can decrease performance by not letting the load balancing service do its thing. Should you ever use Session variables? They are too compelling (in my opinion) to answer with a flat "NO". However, their simplicity belies the caution and thought that should go into their use.

DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

blog comments powered by Disqus
ASP ARTICLES

- Central Scoreboard with Flash and ASP
- Calorie Counter Using WAP and ASP
- Creating PGP-Encrypted E-Mails Using ASP
- Be My Guest in ASP
- Session Replacement in ASP
- Securing ASP Data Access Credentials Using t...
- The Not So Ordinary Address Book
- Adding and Displaying Data Easily via ASP an...
- Sending Email From a Form in ASP
- Adding Member Services in ASP
- Removing Unconfirmed Members
- Trapping HTTP 500.100 - Internal Server Error
- So Many Rows, So Little Time! - Case Study
- XDO: An XML Engine Class for Classic ASP
- Credit Card Fraud Prevention Using ASP and C...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials