Click here to Skip to main content
12,501,486 members (55,104 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

4.2K views
1 bookmarked
Posted

Session time-out setting in ColdFusion

, 28 Oct 2014 CPOL
Rate this:
Please Sign up or sign in to vote.
Knowing how session time-out work in ColdFusion

Introduction:

We will know about the session timeout management in ColdFusion.

Use Cases:

Case : 1

In CF Admin Under Server Setting >> Memory Variables 

           The session timeout value was set to 30 mins

In My Application inside Application.cfc

           The session timeout value was set to 20 mins

Case : 2

In CF Admin Under Server Setting >> Memory Variables 

           The session timeout value was set to 20 mins

In My Application inside Application.cfc

           The session timeout value was set to 30 mins.

In the above 2 cases what would be the precendence of the session timeout values??
 
Answer:
      case : 1 - session timeout value would be 20 minutes
      case : 2 - session timeout value would be 30 minutes
 
Hence in both the cases the session timeout setting in CF Admin would be overwritten by the session timeout  setting provided inside Application.cfc in the Application.
 
So it is a good habit to set the Memory variables inside the Application.cfc for an Application.

 

Using the code:

// code block to use session timeout value
   <cfapplication 
        name = "My Application"
        sessionmanagement = "true"
        sessiontimeout = "#CreateTimeSpan(0,1,0,0)#"
        applicationtimeout = "#CreateTimeSpan(0,12,0,0)#">

The above code in Application.cfc will et the session timeout to 1 hour and the application timeout to 12 hours.(overriding the session and application timeout values those are set in CF Admin)

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Himansu Sekhar Khuntia
Software Developer (Junior)
India India
No Biography provided

You may also be interested in...

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160919.1 | Last Updated 28 Oct 2014
Article Copyright 2014 by Himansu Sekhar Khuntia
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid