Results 1 to 10 of 10

Thread: How to create unique sessions ?

  1. #1

    Thread Starter
    Member shamloo's Avatar
    Join Date
    Oct 2000
    Location
    Stockholm, Sweden
    Posts
    32

    How to create unique sessions ?

    How do I create dynamic, unique sessions ?

    Can it even be done and how hard is it ?

    I do not want to use the application-scope...

    David
    "There are no must's in life unless you provide for someone else than yourself"

  2. #2
    Hyperactive Member MarkusJ_NZ's Avatar
    Join Date
    Jun 2001
    Posts
    375
    hi, what context do you mean?

  3. #3

    Thread Starter
    Member shamloo's Avatar
    Join Date
    Oct 2000
    Location
    Stockholm, Sweden
    Posts
    32
    I mean like they do on this page:
    http://www.idealbb.com/default.asp?sessionID=

    David
    "There are no must's in life unless you provide for someone else than yourself"

  4. #4
    Hyperactive Member MarkusJ_NZ's Avatar
    Join Date
    Jun 2001
    Posts
    375
    Hi , if you want to kill your session you could go Session.Abandon and then response.redirect to the page that was requested.

  5. #5

    Thread Starter
    Member shamloo's Avatar
    Join Date
    Oct 2000
    Location
    Stockholm, Sweden
    Posts
    32
    Yes, I already knew that

    But how do I create the unique value in the first place ??

    David
    "There are no must's in life unless you provide for someone else than yourself"

  6. #6
    Hyperactive Member MarkusJ_NZ's Avatar
    Join Date
    Jun 2001
    Posts
    375
    Oh ok, the uniques session value is automatically made by the server when a user connects (Session starts). If you want to create a unique value manually you can abort the session and then when you go to the next page the server will give you a new session id.

    HTH
    Mark

  7. #7

    Thread Starter
    Member shamloo's Avatar
    Join Date
    Oct 2000
    Location
    Stockholm, Sweden
    Posts
    32
    okay...
    but how do I print the unique session value ?

    David
    "There are no must's in life unless you provide for someone else than yourself"

  8. #8
    Hyperactive Member MarkusJ_NZ's Avatar
    Join Date
    Jun 2001
    Posts
    375
    Response.Write Session.SessionID

    Regards
    Mark

  9. #9

    Thread Starter
    Member shamloo's Avatar
    Join Date
    Oct 2000
    Location
    Stockholm, Sweden
    Posts
    32
    ahh!!
    thanks!

    I guess I should have known that

    You don't happen to know if there actually is a way of creating your own unique session values ?

    First I thought that a had the solution, which was:
    use IP address and datestamp and then squeeze them together.
    But that solutions fails if 2 persons (on the same company that uses only ONE IP address external but more than one internal) enters my page EXACTLY the same time. I still don't know if it's possible to do what I try to achieve.


    Anyhow, thanks again!

    David
    "There are no must's in life unless you provide for someone else than yourself"

  10. #10
    Hyperactive Member MarkusJ_NZ's Avatar
    Join Date
    Jun 2001
    Posts
    375
    Yeah, I actually do

    Use the session id concatenated with the date and time stamp.

    No server will assign the same session id while a person is on the server at the same time.

    I actually used this in a webfarm format and it worked fine

    Cheers
    Mark

Posting Permissions

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



Click Here to Expand Forum to Full Width