Session variables are not being passed on from page to page

P

Paul fpvt2

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")
%>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,479
Members
44,900
Latest member
Nell636132

Latest Threads

Top