Session() variables question

Discussion in 'ASP General' started by Griff, Feb 13, 2007.

  1. Griff

    Griff Guest

    I have an ASP [Classic] application running under IIS 5 & 6 [on different
    servers (obviously)]

    I need to implement Session() variables to cache some frequently looked up
    data. Because of the nature of the data, it is best held in the Session()
    rather than the Application() object.

    My question is: Is there a limit to the how long the parameter name can be?
    For example:

    Session("HairColour") - the parameter name length her is 10 characters -
    what's the max length (is there a max length)?

    I ask because my code will generate these parameter names on the fly and I
    don't want them to break anything.....

    Thanks in advance

    Griff
     
    Griff, Feb 13, 2007
    #1
    1. Advertisements

  2. "Griff" <> wrote in message
    news:...
    > I have an ASP [Classic] application running under IIS 5 & 6 [on different
    > servers (obviously)]
    >
    > I need to implement Session() variables to cache some frequently looked up
    > data. Because of the nature of the data, it is best held in the Session()
    > rather than the Application() object.
    >
    > My question is: Is there a limit to the how long the parameter name can

    be?
    > For example:
    >
    > Session("HairColour") - the parameter name length her is 10 characters -
    > what's the max length (is there a max length)?
    >
    > I ask because my code will generate these parameter names on the fly and I
    > don't want them to break anything.....
    >


    There is no theoretical limit. Of course using names that are 1K in size
    and varying only on the last few characters is going to have some
    performance problems.
     
    Anthony Jones, Feb 13, 2007
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Earl Teigrob

    Global Session Variables and Session State

    Earl Teigrob, Dec 16, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    4,953
    Alvin Bruney
    Dec 17, 2003
  2. Jeff Smythe
    Replies:
    3
    Views:
    1,543
    Jeff Smythe
    Jan 2, 2004
  3. =?iso-8859-15?Q?Fabr=EDcio_de_Novaes_Kucinskis?=

    Session Variables assigned to the wrong session?

    =?iso-8859-15?Q?Fabr=EDcio_de_Novaes_Kucinskis?=, Jan 20, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    842
    Alvin Bruney [MVP]
    Jan 20, 2005
  4. Michael
    Replies:
    3
    Views:
    1,305
    Jim Cheshire
    Dec 30, 2005
  5. Replies:
    1
    Views:
    1,120
  6. =?Utf-8?B?Um9iSEs=?=
    Replies:
    4
    Views:
    5,843
    =?Utf-8?B?Um9iSEs=?=
    Apr 11, 2007
  7. Replies:
    9
    Views:
    1,309
  8. Jazzis
    Replies:
    2
    Views:
    412
    Jazzis
    Sep 23, 2003
Loading...