Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

2 Global.asa = 2 Session?

Posted on 1999-07-23
4
Medium Priority
?
173 Views
Last Modified: 2013-12-25
Hello,
Assume I have 2 virtual folder
http://www.myserver.com/a/
and
http://www.myserver.com/b/
which are c:\a\ and c:\b\ respectively.
In both directory, i have global.asa
When I open http://www.myserver.com/a/default.asp first
and then open
http://www.myserver.com/b/default.asp 

Does that mean two session in one browser?
And does session("myvar") defined in c:\a\global.asa
can readable in c:\b\global.asa?

Thanks.
rgds.
alan
alanpong@hkstar.com
0
Comment
Question by:alanpong
[X]
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
  • 2
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
TTom earned 150 total points
ID: 1864326
Sessions are mutually exclusive.  Any session for any application will create variables readable ONLY by that session.

In your case, I believe you would have two completely separate sessions (in two separate apps).  That is certainly possible, and there would be no relation between the two.

In fact, if you open a second instance of the browser and reenter the first app, you would have two sessions in the same app.  They would still not be able to communicate values one to the other.

Tom
0
 
LVL 1

Author Comment

by:alanpong
ID: 1864327
TTom, actually, in
http://www.myserver.com/a/,
session("userid") = 123 is defined after the login page.
When the user then visit the http://www.myserver.com/b/,
i don't want he to login again since the permission of
the pages under b/ are depend on session("userid")

Any idea? is cookie a good solution? or use
global application("...") variable?

Thanks.
0
 
LVL 9

Expert Comment

by:TTom
ID: 1864328
I think the cookie is going to be the way to go.  A global application variable would not work, since it would be defined for the first user who logged in.

However, if these two directories are tied together, why two applications, two global.asa's.  Seems to me that it is the same application, just moving to another directory.  That should not be a problem.  A session variable should work fine.  Only problem would be if http://www.myserver.com/b/ is also a valid 'entry point' to the application (i.e., users could come in either from /a or /b).

Tom
0
 
LVL 1

Author Comment

by:alanpong
ID: 1864329
Yes. Cookie is the solution.

Remarks :
http://www.myserver.com/a/ is the homepage of my
company.
http://www.myserver.com/b/ is an application which take
much more computer resource.
(not everyone visits b/ but everyone visits a/)

rgds.
alan

0

Featured Post

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
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).
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses

730 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