Click to See Complete Forum and Search --> : Session variables not carrying over from one Asp page to another...


BrewGuru99
January 3rd, 2000, 01:05 PM
I am expanding my website, and have added a new virtual directory that is parallel with the Scripts directory (Both physically and virtually). If the user is not logged on (Determined by Session("ID")) Then I redirect them to the login page. I have gone through, and determined that the IP address does not change, but as soon as the login page redirects the user to the page that directed the user to it, ALL my session variables are wiped out. I don't know if this has something to do with the directory structure I'm using, but so far, all my redirects to the PlanCheck directory wipe out my variables (and that's not good!!! :)


My directory structure:

InetPub
|_____PlanCheck
|_____Scripts



<%
IF Session("ID") <> "" then
'Display page normally
else
'Redirect to login page
Response.Redirect "../Scripts/Login.asp?Database=PlanCheck"
END IF
%>




Any response would be appreciated:)

Brewguru99

BrewGuru99
January 3rd, 2000, 01:24 PM
Whelp, I've figured out that the variables are unique to each directory, and that if I go back to that directory, they are still there.

Why is it doing this? Aren't session variables unique to each IP address? Is there a way to transfer the session variables from one part of the site to another?

I can get around this problem by posting all the variables in the url of the redirect, but this makes for some ugly, time consuming code. Not to mention that there are some variables that I would not like the user to be able to see or modify.

Any suggestions?

Brewguru99

czimmerman
January 3rd, 2000, 05:42 PM
Microsoft has identified what you are describing as a bug in Active Server Pages. See KB article Q173307.

Charlie Zimmerman
http://www.freevbcode.com