Can a new session be forced???

Discussion in 'ASP General' started by yabba, Jun 15, 2004.

  1. yabba

    yabba Guest

    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
     
    yabba, Jun 15, 2004
    #1
    1. Advertising

  2. yabba

    Evertjan. Guest

    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 ???


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Jun 15, 2004
    #2
    1. Advertising

  3. > <% 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
     
    Aaron [SQL Server MVP], Jun 15, 2004
    #3
  4. yabba

    yabba Guest

    How do I do it from the client?

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

    TIA

    In article <>, software_AT_darkfalz.com
    says...
    >
    >not from the server (ASP)
    >
    >--
    >Curt Christianson
    >Owner/Lead Developer, DF-Software
    >Site: http://www.Darkfalz.com
    >Blog: http://blog.Darkfalz.com
    >
    >
    >"yabba" <> wrote in message
    >news:...
    >> 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
    >>

    >
    >
     
    yabba, Jun 15, 2004
    #4
  5. yabba

    Evertjan. Guest

    Luis wrote on 16 jun 2004 in microsoft.public.inetserver.asp.general:

    > On Tue, 15 Jun 2004 16:19:54 -0400, "Aaron [SQL Server MVP]"
    > <> wrote:
    >
    >>> <% 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.
    >>

    > 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?


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Jun 16, 2004
    #5
  6. yabba

    Luis Guest

    On Tue, 15 Jun 2004 16:19:54 -0400, "Aaron [SQL Server MVP]"
    <> wrote:

    >> <% 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.
    >

    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?
     
    Luis, Jun 16, 2004
    #6
  7. yabba

    Luis Guest

    "Evertjan." <> wrote in message news:<Xns950AD0136EE34eejj99@194.109.133.29>...
    > 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.
     
    Luis, Jun 17, 2004
    #7
  8. yabba

    Evertjan. Guest

    Luis wrote on 17 jun 2004 in microsoft.public.inetserver.asp.general:

    > "Evertjan." <> wrote in message
    > news:<Xns950AD0136EE34eejj99@194.109.133.29>...
    >> 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.
    >


    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.

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Jun 17, 2004
    #8
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?ZmJ3aGl0ZUBvbmxpbmUubm9zcGFt?=

    Users are randomly losing session and are forced to relogin

    =?Utf-8?B?ZmJ3aGl0ZUBvbmxpbmUubm9zcGFt?=, Nov 10, 2004, in forum: ASP .Net
    Replies:
    7
    Views:
    576
    =?Utf-8?B?U2hyaW5pdmFz?=
    Dec 3, 2004
  2. RZavulunov
    Replies:
    2
    Views:
    459
    Danny Tuppeny
    Jan 6, 2006
  3. =?Utf-8?B?SmltbXk=?=
    Replies:
    2
    Views:
    808
    =?Utf-8?B?SmltbXk=?=
    Mar 15, 2007
  4. John Kotuby
    Replies:
    5
    Views:
    419
    Scott Lloyd
    Dec 18, 2007
  5. Carsten Fuchs
    Replies:
    17
    Views:
    1,032
    James Kanze
    Apr 8, 2008
Loading...

Share This Page