Skip to main content
Inspiring
December 19, 2008
Question

application.cfc not compiling

  • December 19, 2008
  • 4 replies
  • 805 views
My application.cfc not compiling. I'm using application.cfc first time, i'm used to using application.cfm, but now trying to switch.

I've attached the code. Application.cfc is not being executed for some reason.

My environment:
win2008
cf8
iis7

Thank you,
Syed
    This topic has been closed for replies.

    4 replies

    BKBK
    Community Expert
    Community Expert
    December 21, 2008
    Splitzer,
    Save the file as Application.cfc

    December 20, 2008
    The BEST way to avoid problems, is to use an example already tried and tested and adapt to your needs:

    http://www.coldfusionjedi.com/downloads/application.cfc.txt

    Cheers,
    Mikey.
    jbird5k
    Inspiring
    December 19, 2008
    I have a similar situation,, in that only the first application variable is recognized.

    <cffunction name="onApplicationStart" output="false" returnType="void">
    <!--- any variables set here can be used by all pages --->
    <cfset Application.dsn = "MyCorp">
    <cfset Application.Company = "JB Design">
    </cffunction>

    the dsn is recognized and the company throws error," the element company is undefined in Application"

    any ideas

    TIA

    J
    Inspiring
    December 19, 2008
    On Fri, 19 Dec 2008 06:31:52 +0000 (UTC), splitzer wrote:

    > My application.cfc not compiling.
    [...]
    > I've attached the code. Application.cfc is not being executed for some reason.

    What makes you say it's not being executed?


    > <cfparam name="session.role_id" default="">
    > <cfparam name="session.username" default="">

    You should be setting these in onSessionStart(), not onApplicationStart(),
    btw.

    --
    Adam
    splitzerAuthor
    Inspiring
    December 19, 2008
    Adam,
    application.cfc is not listed in Execution file list like application.cfm. Non of the application or session variables are being created.

    I'll move the param values to onSessionStart(), thanks for the suggestion.



    quote:

    Originally posted by: Newsgroup User
    On Fri, 19 Dec 2008 06:31:52 +0000 (UTC), splitzer wrote:

    > My application.cfc not compiling.
    [...]
    > I've attached the code. Application.cfc is not being executed for some reason.

    What makes you say it's not being executed?