Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 230
  • Last Modified:

Urgent Cookie Problem

I seem to have a problem with my site.. If cookies are disabled my session variables dont set and i get a blank Page. But viewing the source shows coldfusion error that is session is undefined..

this is my application page
<cfapplication sessionmanagement="yes" name="ac" sessiontimeout="#CreateTimeSpan(0,1,0,0)#" clientmanagement="yes">

What can be the problem??

Thankyou
0
chizzy60
Asked:
chizzy60
3 Solutions
 
chizzy60Author Commented:
Also the page is in a framset...
But i dont think that can be the problem..
0
 
pinaldaveCommented:
use #session.urltocken# use inthe link...
if the cookie is not enable then session will be saved...
you need to have them specify in url like as I mentioned above like
<a href="index.cfm?eid=12&#session.urltocken#">

it should work....
---Pinal
0
 
black0psCommented:
I think it's actually #Client.URLToken#, not session. That is a way you can pass your client CFID and CFToken variables to maintain the session state. You may also want to consider entering the following line of code under your cfapplication tag (in case your browser is not setting the cookie because of no privacy policy) for testing purposes:

<!--- Include Compact Privacy Policy --->
<cfheader name="P3P" value='CP="NOI COR NID CUR ADM OUR STD"'>

This will tell Internet Explorer to that it is ok to allow cookies to be set.
0
 
mrichmonCommented:
If you do not enable cookies you really are limiting what can be done with session variables.  COld fusion uses what are called "memory only" cookies to keep track of session variables.  If you disable these then you have to pass the CFID and CFTOKEN around in the URL and have the possibility of session hijacking occurring.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now