Results 1 to 3 of 3

Thread: Maximum number of Session variables

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    266
    Hi there,
    What is the maximum number of session and application variables that one can have on any web application using ASP? What is the criteria for deciding this?
    Thanks in advance.

  2. #2
    Hyperactive Member compuGEEK's Avatar
    Join Date
    May 1999
    Location
    Mpls,MN,USA
    Posts
    281
    I don't know what the maximum amount is, but you really wouldn't want to have too many because for every hit to your webserver, a session is created.

    Each session variable is greater that 5KB or more in size
    (usually more). You could imagine what kind of load that would be on your web server, especially if you had a handful of users on your site at the same time. Your webserver would be really slow.

    I've even heard that you should disable session objects if your not gonna use them.

    <% @EnableSessionState=False %>

    A better solution might be to use hidden fields or cookies. If the information your passing isn't too sensitive you could pass it via the URL string.

  3. #3
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    avoid using session variables!


    session variables ARE cookies!

    If the user has cookies disabled on his/her browser your site will not function as intended.

    like compuGEEK suggests, use hidden fields instead if possible

    read this:
    http://www.4guysfromrolla.com/webtec...ced/faq4.shtml


    Mark
    -------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width