I am trying to reuse some files throughout few sites by using Virtual Directories. So I have virtual directories mapped in IIS for the files/folders I need. These virtual files all use application.xyz variables such as dns and paths. So when I try to use these files I am getting "Element xyz is undefined in APPLICATION". So it looks like the virtual directories are ignoring my application settings. Is there any way around this?
We use real directories, directly off the webroot, for common use things like images, js, css, etc. Then we call them with /directory/file
ColdFusion's server side code is not aware of IIS virtual directories. If you want /directory/file.cfc to be accessible to server side CF code you will need to add a mapping entry in the CF administrator that tells CF that '/directory' maps to a folder on your file system such as 'C:\myweb\directory'.
Thanks for the answer. Another possibility that I found out is to create application.cfc in each folder that has <cfinclude template="/application.cfc"> in it.