title: Converting application.cfm to application.cfc, losing session management
body: <p>I've got an old site that hadn't been updated in a while, and when I went to add some new code I decided to upgrade to the application.cfc.  Clearly I'm not understanding how it should work, because once I switched it started ignoring the session variable set when the user logs in.</p>
  
  <p>My application.cfm:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;cfcomponent&gt;
  &lt;cfset request.root=""&gt;
  &lt;cfapplication 
    name = "SCR"
          sessionmanagement = "Yes"
          sessiontimeout = "#CreateTimeSpan(0,1,0,0)#"
          applicationtimeout = "#CreateTimeSpan(0,12,0,0)#"&gt;
  &lt;/cfcomponent&gt;
  </code></pre>
  
  
  
  <p>My application.cfc</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;cfcomponent&gt; 
      &lt;!--- Set up the application. ---&gt;
      &lt;cfset THIS.Name = "SCR" /&gt;
      &lt;cfset THIS.ApplicationTimeout = CreateTimeSpan( 0, 12, 0, 0 ) /&gt;
      &lt;cfset THIS.SessionManagement = true /&gt;
      &lt;cfset THIS.SessionTimeout = CreateTimeSpan( 0, 3, 0, 0 ) /&gt;
      &lt;cfset THIS.SetClientCookies = true /&gt;
      &lt;cfset request.root=""&gt;
  
      &lt;cffunction name="onApplicationStart" returnType="boolean" output="false"&gt;
          &lt;cfreturn true&gt;
      &lt;/cffunction&gt; 
  
      &lt;cffunction name="onRequestStart"&gt;
          &lt;cfargument name="requesturi" required="true"/&gt;
      &lt;/cffunction&gt;
  &lt;/cfcomponent&gt;
  </code></pre>