Solved

session variable value lost during folder change

Posted on 2004-09-15
6
228 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Blog posts not showing up on Blog page 7 58
How to redirect all users but me properly to another page with htaccess 2 95
paypal ipn url 5 57
tutorial for ebay api 3 34
Read about why website design really matters in today's demanding market.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo‚Ķ
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

777 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