Quantcast
Channel: Adobe Community: Message List - ColdFusion
Viewing all articles
Browse latest Browse all 21760

Session Variables Reset

$
0
0

Hi Everyone!

 

We have been having issues with session variables being dropped/changed. Basically what is happening is a user submits a web form and the session variable is changed. We also have problems on other pages where a user will enter their username and password, but once page navigates to the next page or even within the same page when a form is submitted, session variables gets reset. We noticed CFID and Token is different when we navigate or page gets refreshed. I have checked session management settings all over and don't think that's the problem. I have searched and found similar issues but none of the proposed fixes have seemed to work for us. I should also say this problem does not occur for every user. It seems intermittent which adds to the fun... 

 

Our pages all worked fine under Windows 2003 and CF8. We built new W2k8 servers with CF10, moved our files over and set up the new sites so it can’t be left over isapi connectors in IIS. Here is the problem in a nutshell with some code:

 

After authentication,

  1. Session.UserID is set with a value.

<cfset Session.UserID =”loggedinUser”> 

 

  1. Session.UserID is BLANK when form is submitted, because refreshing the page changes CFID and TOKEN value. It thinks it’s a new session.

<cfif IsDefined(“form.saveForm”) AND Session.UserID NEQ “”>

 

Some Query Goes Here….

But can’t get to here because Session.UserID is EMPTY </cfif>

 

<form action=”?” method=”post”>

 

<input type="submit" value=" Save Changes " name=”saveForm”> </form>

 

 

Any ideas on things to try would be greatly appreciated!

 

Thanks!

Jonathan


Viewing all articles
Browse latest Browse all 21760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>