Ok, Sorted!
I needed the this. Stuff Between the component and first function, ie the constructor. This fixed all my problems. Regards Dale Fraser > -----Original Message----- > From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of Shib71 > Sent: Friday, 27 January 2006 2:23 PM > To: cfaussie@googlegroups.com > Subject: [cfaussie] Re: application.cfc prblems > > According to the Macromedia livedocs > <http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/commo > n/html/wwhelp.htm?context=ColdFusion_Documentation&file=00000692.htm> , in > a cfc you set the corresponding application variables in the cfc init > (before any of the methods). Try setting application.sessionManagement to > "yes". > > Blair > > > On 1/27/06, Dale Fraser <[EMAIL PROTECTED]> wrote: > > > I thought you didn't need it anymore with application.cfc > > That's what all the this. Variables do? > > Regards > Dale Fraser > > > > -----Original Message----- > > From: cfaussie@googlegroups.com <mailto:cfaussie@googlegroups.com> > [mailto:[EMAIL PROTECTED] On > > Behalf Of Shib71 > > Sent: Friday, 27 January 2006 2:13 PM > > To: cfaussie@googlegroups.com <mailto:cfaussie@googlegroups.com> > > Subject: [cfaussie] Re: application.cfc prblems > > > > If you're using session or client variables you need to enable > them using > > the cfapplication tag. You probably had that in the origonal file > but > > forgot to move it over. > > > > Blair > > > > > > On 1/27/06, Dale Fraser <[EMAIL PROTECTED]> wrote: > > > > > > Converting an application to use application.cfc from .cfm > > > > Can't get it to work. > > > > I get on my login page an error. > > > > The requested scope session has not been enabled. > > Before session variables can be used, the session state > management > > system > > must be enabled using the CFAPPLICATION tag. > > > > My application.cfc looks like this > > > > <cffunction name="onApplicationStart" returntype="boolean" > > output="false"> > > <!--- Setup Datasouce ---> > > <cfset datasource = ListGetAt(CGI.PATH_INFO, 1, "/") > /> > > <cfif find(".cfm", datasource)> > > <cfset datasource = > listGetAt(CGI.SERVER_NAME, 1, > > ".") /> > > </cfif> > > > > <!--- Setup Variables ---> > > <cfset this.version = "2.0.0" /> > > <cfset this.name <http://this.name> = datasource /> > > <cfset this.started = now() /> > > <cfset this.filePath = expandPath("..") /> > > <cfset this.clientManagement = true /> > > <cfset this.sessionManagement = true /> > > <cfset this.loginStorage="cookie" /> > > <cfset this.sessionTimeout = createTimeSpan(0, 2, 0, > 0) /> > > > > <!--- Read Configuration ---> > > <cfset this.config = structNew() /> > > > > <!--- Read XML Config File ---> > > <cffile action="read" > > file="#this.filePath#\config\#datasource#\config.xml" > charset="utf- > > 8" > > variable="config" /> > > <cfset configXml = XmlParse(config) /> > > > > <!--- Get Site Config Paramaters ---> > > <cfset nodes = xmlSearch(configXml, "//site/*") /> > > <cfloop index="i" from="1" to="#arrayLen(nodes)#"> > > <cfset this.config[ucase(nodes[i].XmlName)] > = > > nodes[i].XmlText /> > > </cfloop> > > > > <!--- Get Session Config Parameters ---> > > <cfset nodes = xmlSearch(configXml, > "//session/text()") /> > > <cfset this.config.sessionNames = arrayNew(1) /> > > <cfloop index="i" from="1" to="#arrayLen(nodes)#"> > > <cfset arrayAppend(this.config.sessionNames, > > nodes[i].XmlValue) /> > > </cfloop> > > > > <cfreturn true /> > > </cffunction> > > > > Regards > > Dale Fraser > > > > > > > > > > > >