Session Question

Results 1 to 3 of 3

Thread: Session Question

  1. #1
    Join Date
    Dec 1969

    Default Session Question

    I am trying to set a session variable in an asp file and then have another asp file display the info.<BR>ie &#060;% Session("myvar") = "123" %&#062;<BR>and then in another asp file<BR>&#060;%=Session("myvar")%&#062;<BR><BR>Thi s already works on a server running IIS5 but when I copy the files to run on a second server also running IIS5 the session variable does not display. It can be displayed on the first asp page but does not appear to &#039;hold&#039; or display on the next asp page<BR>Is there a setting to be made in the config of IIS for this to work ?

  2. #2
    Join Date
    Dec 1969

    Default Any error you are getting??

    Do this,<BR>&#060;%<BR>Dim varSession<BR>varSession = Session("myvar")<BR>response.write var1<BR>%&#062;

  3. #3
    Join Date
    Dec 1969

    Default RE: Session Question

    You can check that you have registered the site on the second server as an "application" -- IIS won&#039;t hold state if you haven&#039;t.<BR><BR>Also, IIS can be set to not use sessions -- check the properties of the second website.<BR><BR>Sessions rely on cookies. So if the second server is for some reason unable to write a cookie to you PC, then it won&#039;t hold state between pages. Worth checking out.

Posting Permissions

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