RE: Need ASP script to Generate Unique Session ID

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I thought I would clarify more what I am looking for so here is the deal.

I already have a Login.asp page where the user can type in login information
then I have a verify.asp page that verify's the user login info with the
username and password information in MySQL database.
The problem is I need a unique user ID and I could just use some sort of
random user ID number generator function into MySQL as a primary key (userID)
but once the number has been generated for new user that has been added to
MySQL database that user ID is going to be the same for as long as the user
exists in the database.
I would much rather just have my verify page verify that the username and
password are correct and than have ASP assign a session ID to that user for
the duration that they are on my website that way it is more secure and less
likely that someone could guess the URL as the session ID number would only
be valid for the duration that the proper user is logged into the site and
would be a different number the next time that same user log's into the site.

Please can anyone help with this question ?

Dan Thompson

"Dan Thompson" wrote:

Hello I am still quite new to ASP and I am wondering if anyone can help ?
I am trying to write a ASP script to put into my website that will generate
a random and unique Session ID that is stored in a cookie on the clients end
for the duration of time they are logged into my website. Can anyone provide
me with a simple ASP script to do this or at least provide some insight on
how to go about doing this ?

Dan Thompson
.



Relevant Pages

  • Secure website (cookie/session)
    ... Secure a part of my website. ... access to server settings (session timeout, security,...). ... do not lose time re-submitting it because the use was redirect to the ...
    (microsoft.public.inetserver.iis.security)
  • Secure website (cookie/session)
    ... Secure a part of my website. ... access to server settings (session timeout, security,...). ... do not lose time re-submitting it because the use was redirect to the ...
    (microsoft.public.inetserver.iis.security)
  • Re: Sessions and clients
    ... I want to build a website with a certain technique, ... This entrance page gives out a random session URL. ... To see if it's the first time or not, you can't use ip addresses to check for unique users, as has been discussed recently in this newsgroup. ... You will probably have to store a cookie when it is first used, then every time after that, check for the cookie. ...
    (comp.lang.php)
  • Re: NTLM/Browser Storing Any Sessions ??
    ... I'm not sure why sounds like the session was still ... Enabled for all Internet Website. ... Authentication Prompt(it could be the server has been enabled with the ... the authentication to the Intranet Website also? ...
    (microsoft.public.inetserver.iis.ftp)
  • Re: Unreliable timer
    ... if the current time minus the arbitrary 'session' duration is ... > than the timestamp in the database then that user is conceptually ... The concept of auto-logout is simply then: if the current time minus the ...
    (microsoft.public.scripting.jscript)