The problem with this solution is that unless there is an additional cfapplication tag prior to this statement, then the outer-most if statement will always be false and the cfapplication tags will never fire.  You have to turn on the sessionmanagement with cfapplication tag prior to using any session variables.

david



Christopher Jordan wrote:
I would agree with joe here on running cfapplication twice.

<cfif #IsDefined("Session.userType")#>
        <cfif #session.usertype# eq "Big">
                <cfapplication name="Work_Prod" sessionmanagement="yes" sessiontimeout="#CreateTimeSpan(0, 4, 0, 20)#">
        <cfelse>
               
<cfapplication name="Work_Prod" sessionmanagement="yes" sessiontimeout="#CreateTimeSpan(0, 0, 20, 0)#">
        </cfif>
</cfif>


something like that.

Chris

Joe Kelly wrote:
The comments on LiveDocs presented this:

yoinky said on Sep 28, 2005 at 2:03 AM :

   HUGE Pain-In-The-Ass Solution:

   DO NOT USE HYPHEN CHARACTERS IN THE NAME="" ATTRIBUTE!

   Just incase you are pulling your hair out wondering why your
client management isn't working (like I've been doing for the past
week) and have gone through everything and can't get it working on a
database or in the registry, head this very simple "rule" left out of
the documentation.

   if you do use a hyphen, at the end of the request when the client
scope is supposed to be automatically persisted by the runtime, it
will display a "500 NULL" error in html at the bottom of the page, it
won't even throw a real exception or log the error, so you have no
idea it happened.

~~~~~~~~~~~~~~
This may go for underscores as well.....
Plus, I would run <cfapplication> twice, personally.  I'd just place
it in the <cfif> so it ran only once.

Thanks,
Joe Kelly

On 8/16/06, Ray Hughes <[EMAIL PROTECTED]> wrote:
Hi All,

I am having an issue with session timeout.  In the application.cfm I have
the following:
<cfapplication sessionmanagement="yes" name="Work_Prod">
This is the first line in the application.cfm. I was hoping the I could
replace this with a further definition further down in the code.

The default session timeout on the prod server from Cf Admionistrator are as
follows:
Session Variables
Enable session variables        Yes
Default Timeout         0,0,20,0
Maximum Timeout         2,0,0,0

I have two type of users Big and Small.

I want to set the session timeout to 4 hours for the Bid users and leave the
session timeout at 20 minutes for the Small users.

I have put the following in the application.cfm further down in the code.
But this does not seems to work. The session still seems to time out at 20
minutes. Should thiscode work?
<cfif #IsDefined("Session.userType")#>
        <cfif #session.usertype# eq "Big">
                <cfapplication name="Work_Prod" sessionmanagement="yes"
sessiontimeout="#CreateTimeSpan(0, 4, 0, 20)#">
        </cfif>
</cfif>

I was presuming that after the "BIG" user logged in that this If statement
would over write
the previous CfApplication tag.

Does anyone have any suggestions?

Regards
Ray

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/


_______________________________________________
Reply to DFWCFUG:
  [email protected]
Subscribe/Unsubscribe:
  http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives:
    http://www.mail-archive.com/list%40list.dfwcfug.org/
  http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors:
  www.HostMySite.com
  www.teksystems.com/


_______________________________________________
Reply to DFWCFUG:  [email protected]
Subscribe/Unsubscribe:  http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives:    http://www.mail-archive.com/list%40list.dfwcfug.org/              http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors:  www.HostMySite.com  www.teksystems.com/



_______________________________________________ Reply to DFWCFUG: [email protected] Subscribe/Unsubscribe: http://lists1.safesecureweb.com/mailman/listinfo/list List Archives: http://www.mail-archive.com/list%40list.dfwcfug.org/ http://www.mail-archive.com/list%40dfwcfug.org/ DFWCFUG Sponsors: www.HostMySite.com www.teksystems.com/




_______________________________________________
Reply to DFWCFUG: 
  [email protected]
Subscribe/Unsubscribe: 
  http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives: 
    http://www.mail-archive.com/list%40list.dfwcfug.org/             
  http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors: 
  www.HostMySite.com 
  www.teksystems.com/

Reply via email to