Can a new session be forced???

Y

yabba

When IE file/new/window is used a new IE window is opened to the same session
as the original.

Is there a way to force a new session?

TIA
 
E

Evertjan.

yabba wrote on 15 jun 2004 in microsoft.public.inetserver.asp.general:
When IE file/new/window

= ctrl-N
is used a new IE window is opened to the same
session as the original.

Is there a way to force a new session?

<% Session.Abandon %> in the file ???
 
A

Aaron [SQL Server MVP]

<% Session.Abandon %> in the file ???

Followed by a redirect or reload. Session.Abandon doesn't take full effect
until the page goes out of scope.

A
 
Y

yabba

How do I do it from the client?

I don't want to use session.abandon since that kills the original session.

TIA
 
E

Evertjan.

Luis wrote on 16 jun 2004 in microsoft.public.inetserver.asp.general:
So, if I do something like:

Session("xyz") = blah
Session("123") = tralala
... <do other stuff> ...
Session.Abandon
Responde.Redirect "SomePage.asp"

Will the two session variables not be cleared?

You better test that yourself.

can we hear your results?
 
L

Luis

Followed by a redirect or reload. Session.Abandon doesn't take full effect
until the page goes out of scope.
So, if I do something like:

Session("xyz") = blah
Session("123") = tralala
.... <do other stuff> ...
Session.Abandon
Responde.Redirect "SomePage.asp"

Will the two session variables not be cleared?
 
L

Luis

Evertjan. said:
You better test that yourself.
can we hear your results?

Ok...
The session vars WILL be cleared after the Redirect to the
"SomePage.asp" page.
They WON'T be cleared while still on the same page that the
Session.Abandon command was issued.
 
E

Evertjan.

Luis wrote on 17 jun 2004 in microsoft.public.inetserver.asp.general:
Ok...
The session vars WILL be cleared after the Redirect to the
"SomePage.asp" page.
They WON'T be cleared while still on the same page that the
Session.Abandon command was issued.

Yes, that is according to specs. Sesion.abandon only executes when the page
is left. That means any next page will be a new session.

btw, it is not the sessionvariables that are cleared, but the session ends
when you fech a new page so the variables are not longer ACCESSABLE,
because they belong to another session, that is abandonned, and you are in
a newly started session.

If the old session persists internally till timout does not concern
you[r new page], even if/when session_onend() fires.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top