Session.Abandon

Results 1 to 9 of 9

Thread: Session.Abandon

  1. #1
    Kiran Shiveshwar Guest

    Default Session.Abandon

    I tried using Session.abandon to logout the user.But even after doing this the user can still access the data from the server on clicking the button and even on clicking back button of the browser he can access the data on the server.<BR><BR>Can Anyone help me out how to use session.adandon to logout the user or any other method other than session variables to logout the user.<BR>

  2. #2
    Vivek Nama Guest

    Default RE: Session.Abandon

    Session.Abandon is activated only after all the script on that page has completed execution. Is it possible that after the call to abandon your sciprt goes into some kind of computation or database connection meanwhile giving time to user to clcik the button as the session has not actually finished by then. obviously the response.buffer=false for him to do so

  3. #3
    Kiran Shiveshwar Guest

    Default RE: Session.Abandon (still persist)

    Hi, <BR>Thanks for the reply. I do not have any other statements for execution after Session.Abandon.<BR>What I do is as follows (First few lines of the page)<BR><BR>&#060;%If Request.form("logstatus")="LoggedOut" then%&#062;<BR>You have been logged out.<BR>Session.Abondon<BR>&#060;%Else%&#062;<BR>d o the connection and get the data<BR>&#060;%end if%&#062;<BR><BR>The user on clicking Logout button get the message "You are logged out".But the user can click back button can do the normal transaction as if he has not logged out.<BR><BR>Any Suggestions<BR><BR><BR><BR>

  4. #4
    shailaza Guest

    Default RE: Session.Abandon (still persist)

    Hi..<BR><BR>Have you tried using global.asa file to start the stop the sessions using Session_onStart() and Session_Onend() methods..it helps to stop the session and release the buffer.<BR><BR>


  5. #5
    Vivek Nama Guest

    Default Session.Abandon (still persist)

    your Session.Abandon is not enclosed in &#060;% %&#062; and hence does not get executed at the server end<BR>the session object is not available on the client so it does not get executed at browser end either<BR>and so the session never ends<BR>

  6. #6
    Kiran Shiveshwar Guest

    Default RE: Session.Abandon (still persist)( For Shailaza)

    Can you please explain me in more details with a small code if possible.

  7. #7
    Kiran Shiveshwar Guest

    Default RE: Session.Abandon (still persist)

    Regarding &#060;% %&#062; between Session.Abandon.My actual code already has it.Only while typing in this messageboard I missed it.<BR><BR>Inspite of it Session.Abandon does not work.<BR><BR>Any other solution.<BR>

  8. #8
    Shailaza Guest

    Default RE: Session.Abandon (still persist)( For Shailaza)

    Create a file called global.asa in your web directory. This file will run the existing code whenever the user trying to access the site. This session will be valid until he close the browser.<BR><BR>File Name: global.asa<BR><BR><BR>&#060;SCRIPT LANGUAGE=VBScript RUNAT=Server&#062;<BR><BR>SUB Session_OnStart<BR>Response.Write "Inside Session on START procedure" <BR>&#039 Create a session object here<BR>Set Session("AKU") = Server.CreateObject "IFLCORBAOCX.IFLCorbaOCXCtrl.1")<BR>END SUB<BR><BR>&#060;/SCRIPT&#062;<BR><BR>&#060;SCRIPT LANGUAGE=VBScript RUNAT=Server&#062;<BR><BR>SUB Session_OnEnd<BR>Response.Write "Inside Session on STOP procedure..,,,..!"<BR>Session.Abandon<BR>END SUB<BR><BR>&#060;/SCRIPT&#062;<BR><BR>

  9. #9
    Vivek Nama Guest

    Default Session.Abandon (should not persist)

    set a sessionid in the calling page<BR>and introduce the following change in the called page<BR><BR>&#060;%If Request.form("logstatus")="LoggedOut" then%&#062;<BR>You have been logged out.<BR>&#060;% session("sessionid")=""<BR> Session.Abondon %&#062;<BR>&#060;%Else%&#062;<BR> &#060;% if session("sessionid") &#060;&#062; "" then <BR> do the connection and get the data %&#062;<BR> &#060;%end if%&#062;<BR>&#060;%end if%&#062;<BR><BR>the same can also be done if the page calls itself<BR>if this still does not solve your problem send me the code of both the called and calling pages at vnama@corbus.com<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •