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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Session keeps getting lost

Status
Not open for further replies.

caljedi

Programmer
Sep 27, 2006
4
US
Hi,
I have a strange session-related issue. I'm running Coldfusion 5 Professional edition on Windows 2000 Server. Here's the issue:

=> Page1.cfm receives a SESSIONID (say SESS_MGMT_399_46591041 )
=> every time the page reloads, it receives a new SESSIONID .
This is causing my session variables to be lost, since every time a page links to another, a new SESSIONID gets created effectively losing the old session and its variables.

Looks like this happens only when the client browser is IE 6, and that too , it shows up on some client machines and not others.

Please help ! : )
 
Are you tracking this variable using cookies? If so, if cookies are disabled then you get a new session with every page unless you otherwise track state.



Cheers,

Bluetone
 
hi bluetone,
Thanks for the reply. Is there a way to track session without using cookies ? I'm new at this; are there any specific variables I need to include in the Application.cfm file I need to use besides "sessionmanagement" and sessiontimeout ?
 
You can use the URLSessionFormat function - for every stinking link, cflocation etc. URLSessionFormat will check to see if the user accepts cookies. If they do you can track state (SESSION.CFID and SESSION.CFTOKEN) that way. If they don't then CFID and CFTOKEN are included in the URL.

Some users disable cookies because they think they are a security issue. So if you are running for example an e-commerce site you have to run these kinds of checks and track state manually for those users.

I just remembered - I don't think URLSessionFormat is available in CF5. You can write a routine to do the same thing however or just put the CFID/CFToken in every stinking :) URL - not the best security scenario.

Also, look in your ColdFusion administrator and check on how it is storing state. You can use cookies, a database, or the registry (memory). There are pros and cons to each depending on how many users you have and what kind of hardware you have. Storing them as cookies could obviously be an issue.

Assuming you are using CFID and CFToken to track state - no you don't need to add anything to the Application.cfm file.

Cheers,

Bluetone
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top