Copy link to clipboard
Copied
Hi all,
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?
Thanks
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'.
http://help.adobe.com/en_US/ColdFusion/9.0/Admin/WSc3ff6d0ea77859461172e0811cbf3638e6-7ffc.html#WSc3ff6d0ea77859461172e0811cbf364104-7ff9Copy link to clipboard
Copied
We use real directories, directly off the webroot, for common use things like images, js, css, etc. Then we call them with /directory/file
Copy link to clipboard
Copied
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'.
http://help.adobe.com/en_US/ColdFusion/9.0/Admin/WSc3ff6d0ea77859461172e0811cbf3638e6-7ffc.html#WSc3ff6d0ea77859461172e0811cbf364104-7ff9Copy link to clipboard
Copied
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.