How application.cfc is supposed to work (AJAX & onRequest)
I'm an intermediate CF developer using CF8 on a Windows 2k3 box. We are using AJAX, and as such are using the following chunk o' code in the onRequestStart to ensure AJAX calls don't have issue:
<cfif listLast( cgi.cf_template_path, '.' ) is 'cfc'>
<cfset structDelete( this, 'onRequest' ) />
</cfif>
Everything is working fine, however, when I perform an AJAX call to a file that resides at: /framework/com/page.cfc I get an error message that seems to be the application.cfc firing off from the com folder (located at /framework/com) It states it cannot find the config.ini file in that folder, but the config.ini file is in the root, where the application.cfc is. To load the config.ini, I am using:
<!--- Get config file keys for application settings. --->
<cfset lstKeys = evaluate( 'getProfileSections( getDirectoryFromPath( getBaseTemplatePath() ) & "\config.ini" ).#application.vars.environment#' ) />
(The above code is where the error message references) I'm told the app.cfc transcends down the folder path until another application.cfc is found (I'm not using others), so is the app.cfc running from the /framework/com folder? is that why it's trying to find a config file at /framework/com/config.ini?
