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

cookies set in CF automatically delete

Status
Not open for further replies.

750GSXR

Programmer
Jul 5, 2010
6
CA
I have a admin system setup at work that validates a user based on what cookie is set upon login and that determins what access that specific user has access to in the admin.

The problem is that some users after a few minutes get an error that the cookie has not been defined. basically, the cookie is set but then the cookie expires. I've double and triple checked the cookies to confirm that the "expire" is set to "never" except if the logout component is invoked,

any ideas.

Thanks in advance
Craig
 
Does this happen on different clients or just one? If it is all of them, search all of you code and make sure you're not deleting them with code you may have forgotten about.

Why are you not using session variables?

Lyndon

---People Remember about 10% of what you say ---They never forget how you made them feel. Covey
 
Its happening on one client computer in particulat but it occasionally happens on other systems as well

the reason im using cookies is its an older code when I first started with CF and honestly had no cluse what session variables were then. I have not had the time to update it but that might be a good idea as well but very time consuming as the cookie is used in many different places. It would be a lot of tracking down.
 
I would do it if I were you. Having critical data on the client is just asking for trouble!

Lyndon

---People Remember about 10% of what you say ---They never forget how you made them feel. Covey
 
ok...I spent a few hours yesterday and took yuor advice and switched everything to Session.variables and the same thing is happening on only one particular computer. Im baffled.
 
1. Is the client that is having problems using the same browser as the others?

2. Could the client have security software causing problems? Some malware protection software can be very intrusive.

3. Text search all of your code for that users' ID and see if you've forgotten to remove some temporary condition that you used when designing the application.

4. Create a new temporary ID for that user and see if the behavior changes.

There are some ideas. This condition will be tough to track down.

Lyndon

---People Remember about 10% of what you say ---They never forget how you made them feel. Covey
 
1. same browser, different version...I will update the browser this afternoon

2. I have no clue what on her computer, hers is a laptop with biometric scanner, the others are regular desktops

3 The userId is server from a DB, so no mention of it in the raw code anywhere

4. Did something similar, had other user loginto the system and she got kick out too after about 20 - 25 minutes.
 
I sure seems like it is client configuration. Given that the laptop user can use any other workstation and be fine, you might try another browser like chrome, FF, IE and see if the problem persists.

You might also try picking a template that this user frequents and coding:
Code:
<cfif Session.UserID eq 'ProblemUsersID'>
  <cfset Session.UserID = 'ProblemUsersID'>
</cfif>

If this stops the behavior you'll know the client setup causing the server to loose the identity of of the client.

BTW, is the error when using the session.var the same as when it was a cookie?

Lyndon

---People Remember about 10% of what you say ---They never forget how you made them feel. Covey
 
I've just been told a couple of other users experience the same problem but only occasionally like once or twice a week...Im not worried about that, just are probably just logging out and forgetting.

Yes, its the same problem with the laptop...
It was dropping the cookie and generating the error saying cookie not defined, then I setup cfparam to default the cookies to BLANK, then the error persisted and then I switched it to sessions and same think, it boots users back to login screen
opps, I forgot to add session managment to the Application page...lets try that...
 
There a spacific message for session management not enabled. Let's hope that's it.

Lyndon

---People Remember about 10% of what you say ---They never forget how you made them feel. Covey
 
750, did you solve this? I'm curious...

Lyndon

---People Remember about 10% of what you say ---They never forget how you made them feel. Covey
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top