Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unique Session IDs

Status
Not open for further replies.

Vorsuc

Programmer
Feb 7, 2002
5
GB
I'm an ASP blokey just getting to grips with ColdFusion. What I want to do is create a directory for a user to upload files from a form to. The directory should be named after their unique session id. Once everything has been confirmed, then the files will be moved to the files directory.

What I want to know is how do I get at the session ID ? in ASP I'd just use 'Session.SessionID' .. what's the ColdFusion equivalent ? Is it to do with CFID and CFTOKEN ? These seem to change when I hit F5 and refresh the page.
 
> Is it to do with CFID and CFTOKEN ?
NO. Session.CFID is the client ID and Session.CFToken is the ckient security token. both are normally stored on the client machine as cookies.

> how do I get at the session ID ?
Session is a structure. Use any (read) structure functions, such as Structfind(). Or just use the dot syntax: Session.SessionID


From the online reference:

Variables tied to an individual client that persist for as long as that Client ID maintains a session. Session variables, like current client variables, require a client name and are available only to that one Client ID.

Unlike client variables, session variables are stored in the server's memory and can be set to time-out after a precise period of inactivity.

Session variables are stored in structures. For more information, see "Variables stored in structures".

Session variables should be locked when accessed. For information, see the description of cflock.

Session variables are part of the ColdFusion Web Application Framework. This means that they are used in the context of an Application.cfm page. For more information, see Developing ColdFusion Applications and the description of cfapplication.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top