Session variables are not being passed on from page to page

Discussion in 'ASP General' started by Paul fpvt2, Nov 2, 2004.

  1. Paul fpvt2

    Paul fpvt2 Guest

    One of our client is using IIS 6 on Windows 2003 server.
    ASP pages on their website can not pass the session variable from page to
    page.
    For example, TestFrom.asp sets session variable session("IM_Rights") to 4,
    and TestTo.asp retrieves it. But, in TestTo.asp session("IM_Rights") is ""
    instead of 4.

    In IIS, for the site's property, checkbox “Enable Session State†is checked
    and Session Timeout = 20.

    How can I fix this problem ? Thank you.

    The following are the codes from TestFrom.asp and TestTo.asp.

    TestFrom.asp
    <%@ Language=VBScript %>
    <%
    session("IM_Rights") = 4
    response.Redirect "TestTo.asp"
    %>

    TestTo.asp
    <%@ Language=VBScript %>
    <%
    response.Write " IM = " & session("IM_Rights")
    %>
     
    Paul fpvt2, Nov 2, 2004
    #1
    1. Advertising

  2. http://www.aspfaq.com/2157

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)




    "Paul fpvt2" <> wrote in message
    news:...
    > One of our client is using IIS 6 on Windows 2003 server.
    > ASP pages on their website can not pass the session variable from page to
    > page.
    > For example, TestFrom.asp sets session variable session("IM_Rights") to 4,
    > and TestTo.asp retrieves it. But, in TestTo.asp session("IM_Rights") is ""
    > instead of 4.
    >
    > In IIS, for the site's property, checkbox “Enable Session State†is

    checked
    > and Session Timeout = 20.
    >
    > How can I fix this problem ? Thank you.
    >
    > The following are the codes from TestFrom.asp and TestTo.asp.
    >
    > TestFrom.asp
    > <%@ Language=VBScript %>
    > <%
    > session("IM_Rights") = 4
    > response.Redirect "TestTo.asp"
    > %>
    >
    > TestTo.asp
    > <%@ Language=VBScript %>
    > <%
    > response.Write " IM = " & session("IM_Rights")
    > %>
     
    Aaron [SQL Server MVP], Nov 2, 2004
    #2
    1. Advertising

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. Lucas Tam
    Replies:
    0
    Views:
    425
    Lucas Tam
    Aug 19, 2003
  2. dee
    Replies:
    9
    Views:
    525
    Joseph Byrns
    Apr 15, 2005
  3. Hanover
    Replies:
    2
    Views:
    3,467
    Karl Seguin
    Sep 8, 2005
  4. Anand
    Replies:
    2
    Views:
    915
    Anand
    Sep 11, 2003
  5. Replies:
    5
    Views:
    116
Loading...

Share This Page