• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Session Variables Randomly Lost between Pages

New Here ,
Jan 19, 2007 Jan 19, 2007

Copy link to clipboard

Copied

My web page uses a session to keep track of who logged in. What I noticed is that the session variables stored appears and disappears randomly on different pages. The wierd thing is that my code is very simple.

For the life of me I can not figure this out....
TOPICS
Advanced techniques

Views

310

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 19, 2007 Jan 19, 2007

Copy link to clipboard

Copied

Add addtoken="yes" to the cflocation tag.

Are your servers loadbalanced by any chance? If so, make sure it's done properly with sticky sessions otherwise the user may be thrown from one server to another.

Hope this helps.
Henry

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 20, 2007 Jan 20, 2007

Copy link to clipboard

Copied

Do besides what Hlevin says

clientmanag ement="yes"
setClientCookies="yes"
sessiontimeout=#CreateTimeSpan(0, 2,0,0)#
<cfdum p var="#Session#">





Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 20, 2007 Jan 20, 2007

Copy link to clipboard

Copied

I go through a hosting company and do not expect them to do any load balancing.

What are sticky sessions?

The cflocation tag also has the addtoken="yes" to it now and symptoms persist.

I tested the case with sessiontimeout=#CreateTimeSpan(0,2,0,0)# instead of the sessiontimeout=#CreateTimeSpan(0,0,120,0)# and symptoms still persist.

Any other suggestions? I think I ran into a wall here....

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 25, 2007 Jan 25, 2007

Copy link to clipboard

Copied

LATEST
which version of CF does your hosting company have exactly (please include Updater and hot fix level)?

can you confirm with your hosting company that the CF server is not part of a cluster?

can you post any and all code in the application that involves session variables? (or send it to me privately aqlong _at_ gmail.com if you'd prefer)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation