Solved

session variable value lost during folder change

Posted on 2004-09-15
6
227 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Select distinct 25 60
Summernote required 3 59
How to get statistic's from a competitors website?! 1 50
Hovering effect 9 30
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to count occurrences of each item in an array.

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now