Your session is tied to the application. With a 10 second timeout, you are
more than likely seeing the application timeout (which means all the
sessions in it are gone too).

You can prove this by changing the application name to something like
#createUUID()# or #now()# and seeing if that is also changing when you
experience your issue.

My guess is that every time you see this issue, the application name will
have changed.


On 3/15/13 12:41 PM, "Bobby" <[email protected]> wrote:

>
>They are different because the sessions aren't persisting. They are being
>recreated on each request.
>
>Whats the session timeout?
>
>On 3/15/13 11:37 AM, "funand learning" <[email protected]> wrote:
>
>>
>>also cfid cftoken are same for me before and after form submission. When
>>I
>>asked my colleague to test, I see they are different before and after
>>form
>>submission. I thought this issue happens when we use cflocation, but I am
>>not using this tag either
>>
>>On Fri, Mar 15, 2013 at 11:34 AM, funand learning
>><[email protected]>wrote:
>>
>>> sorry, it is remote_host in my code. I will try to increase application
>>> time out and try
>>>
>>>
>>> On Fri, Mar 15, 2013 at 12:32 PM, Bobby <[email protected]> wrote:
>>>
>>>>
>>>> No doubt. Also, as Roger pointed out. It is not cgi.remotehsot, it is
>>>> cgi.remote_host.
>>>>
>>>> Cgi.remotehost will result in an empty string.
>>>>
>>>> On 3/15/13 11:24 AM, "Matt Quackenbush" <[email protected]> wrote:
>>>>
>>>> >
>>>> >Your application timeout is seriously set to 10 seconds??  I suspect
>>>>that
>>>> >would hose sessions pretty quickly, but not sure, since I've never
>>>>set an
>>>> >app timeout so short.  :-)
>>>> >
>>>> >HTH
>>>> >
>>>> >
>>>> >On Fri, Mar 15, 2013 at 11:18 AM, funand learning
>>>> ><[email protected]>wrote:
>>>> >
>>>> >>
>>>> >> I did enable session management using cfapplication tag. Below is
>>>>the
>>>> >>piece
>>>> >> of code
>>>> >>
>>>> >> <cfapplication name="app"
>>>> >> applicationtimeout="#createtimespan(0, 0, 0, 10)#"
>>>> >>   sessionmanagement="yes"
>>>> >>   clientmanagement="no">
>>>> >>
>>>> >>
>>>> >> On Fri, Mar 15, 2013 at 12:15 PM, Bobby <[email protected]>
>>>>wrote:
>>>> >>
>>>> >> >
>>>> >> > Sounds like your sessions aren't persisting across requests.
>>>>There
>>>> >>could
>>>> >> > be a couple of reasons but the most common, from what I've seen,
>>>>is
>>>> >>that
>>>> >> > people forget to enable session management in their application.
>>>> >> >
>>>> >> >
>>>> >> > On 3/15/13 10:43 AM, "fun and learning" <[email protected]>
>>>> >>wrote:
>>>> >> >
>>>> >> > >
>>>> >> > >I am converting a hidden variable to session variable. I am
>>>>setting
>>>> a
>>>> >> > >session variable when a page loads. The page consists of a form
>>>> >> > >
>>>> >> > ><cfset session.host = cgi.remotehost>
>>>> >> > >
>>>> >> > >When the form is submitted, the session variable is saved to a
>>>>file.
>>>> >>The
>>>> >> > >form submits to the same page except there is a condition,
>>>> >> > >
>>>> >> > ><cfif isdefined("form.submit)">
>>>> >> > >      <cfinclude template="savetofile.cfm">
>>>> >> > ></cfif>
>>>> >> > >
>>>> >> > >The problem is when I submit the form on my computer, the
>>>>session
>>>> >> > >variable exists and form submission works fine. But when I asked
>>>> some
>>>> >> > >other people at my office to test, they get 'Element host is
>>>> >>undefined
>>>> >> in
>>>> >> > >session' on form's submission.Looks like it is failing in
>>>> >> savetofile.cfm.
>>>> >> > >Why could this be happening?
>>>> >> > >
>>>> >> > >
>>>> >> > >
>>>> >> >
>>>> >> >
>>>> >>
>>>> >>
>>>> >
>>>> >
>>>>
>>>> 
>>
>>
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355036
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to