Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

Rated
Read 43,792 times

Contents

Related Categories

When Session Variables Go Bad - Summary

LACanadian

Summary

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.

I am the owner of a small application development consulting company that specialized in the design and implementation of Internet-based applications. While there are others who can make a web site look good, our expertise is in making the site function. This includes infrastructure design, database design and administration, software development and deployment. For the most part, we utilize Microsoft-based languages and tools. And we are skilled enough to have generated two patent applications for our clients.

Comments

  • Give Alternative for Session

    Posted by arshad3108 on 14 Jan 2004

    Hi Bruce,
    Your Article is informative, but you [b]missed the core point [/b] in explaining what will be the Alternative for Session variables in a Distributed Server Environment. I have used sessio...

  • xml?

    Posted by ark2000 on 23 Jan 2003

    for tker

    Could you point us to some examples? That sounds like a good challange!

  • Posted by MarioF on 04 Sep 2002

    [quote][1]Posted by [b]Nigorr[/b] on 27 Apr 2002 02:53 AM[/1]
    So what should we all be using instead. If we can't use cookies, because essientially seesion things use cookies how are you suppose to ...

  • Re: What to Use Instead

    Posted by LACanadian on 08 May 2002

    Whenever I have created a high-traffic, browser-neutral site, I have maintained session information stored in a database. In other words, when a user logs into the site, they are assigned a 32-charac...

  • Why not use XML?

    Posted by tker on 05 May 2002

    In response to the question of what to use instead, is there any reason not to use XML files (identified via a querystring of the filename) that are stored on the server to track user state? We've bee...