Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

session variable value lost during folder change

Posted on 2004-09-15
6
229 Views
Last Modified: 2006-11-17
Hello

I have a site that uses session variables to determine what is displayed to diffrent users according to rights, it works fine in the root directory but as soon as i move asp pages in  folder it no longers seems to accessing the session variables.

Has any one got any ideas why this is and how i can solve the problem

Thanks
0
Comment
Question by:csbhatt1
6 Comments
 
LVL 2

Expert Comment

by:hint
ID: 12063205
hi,

  just a guess:

1. you might want to check if the browser has cookies enabled.
2. you might want to check if you pages hardcode some cookie locations, or the cookies are created in one folder then access in another.

Cheers,
Zhen
0
 
LVL 2

Expert Comment

by:benbalbo
ID: 12063370
The only thing that springs to mind is - are you including another script that starts the session? Is this script still being correctly included when you move the files into a folder?

If you include "includes/session.asp" then from one folder this will work, but from the other folder you'd need to include "../includes/session.asp"
0
 
LVL 15

Expert Comment

by:joeposter649
ID: 12065703
Are the other directories set up in the same application?
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

by:csbhatt1
ID: 12071961
Yes there are other directories in the same www folder. One thing is strange that it is working for some folders and not for other. i.e.when  i put  the asp page which is using session variables  in one folder the session values are retained and getting displayed correctly while  when I put it another folder the same values are not getting displayed.

0
 
LVL 15

Expert Comment

by:joeposter649
ID: 12074283
Use server.transfer instead of redirect...
http://devguru.com/Technologies/asp/quickref/server_transfer.html
0
 
LVL 15

Accepted Solution

by:
joeposter649 earned 125 total points
ID: 12074301
Sorry, wrong question..

Make sure the directory isn't set up as another application in IIS.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmakerā€¦
The viewer will learn how to count occurrences of each item in an array.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question