Not getting new session id with Session.abandon

Results 1 to 2 of 2

Thread: Not getting new session id with Session.abandon

  1. #1
    Join Date
    Dec 1969

    Default Not getting new session id with Session.abandon

    Try the following simple test asp page. It appears that IE is recycling session ids when session abandons are closely spaced in time. Does anyone have a fix for this behavior?<BR><BR>&#060;&#037;@Language=VBScript&#0 37;&#062;<BR>&#060;&#037;Response.Buffer = true<BR>Response.Expires = -1<BR>Response.Write "Session.SessionID= " & Session.SessionID <BR>Session.Abandon<BR>&#037;&#062;<BR><HTML><BR>< HEAD><BR><meta http-equiv="Pragma" content="no-cache"><BR>&#060;SCRIPT LANGUAGE="JavaScript"><BR>window.alert("Enter tstSession.asp")<BR>&#060;&#047;SCRIPT><BR></HEAD><BR><BODY><BR><P><BR>If you refresh this page, it appears that IE increments the session id <BR><BR>once after it is abandoned. Then it continues to recycle the session id <BR><BR>until you close and restart the browser. This means that IE could get confused <BR><BR>about what session variables it is operating with if you thought that a session.abandon <BR><BR>was going to clear out your session variables.<BR></BODY><BR></HTML>

  2. #2
    Join Date
    Dec 1969

    Default RE: Not getting new session id with Session.abando

    This is what is supposed to happen. <BR>Session IDs are not totally unique;there are a fixed amount. You will never have 2 sessions assigned the same sessionID at the same time but yes, sessionIDs are recycled. You should not use them as unique IDs, instead use an Identity (AutoNumber) or some other method of identifying your users.

Posting Permissions

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