Skip to main content
Inspiring
January 29, 2010
Answered

Virtual Directories & Application

  • January 29, 2010
  • 2 replies
  • 714 views

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

This topic has been closed for replies.
Correct answer JR__Bob__Dobbs-qSBHQ2

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-7ff9

2 replies

JR__Bob__Dobbs-qSBHQ2Correct answer
Inspiring
January 29, 2010

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-7ff9
TiGGiAuthor
Inspiring
January 29, 2010

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.

Inspiring
January 29, 2010

We use real directories, directly off the webroot, for common use things like images, js, css, etc.  Then we call them with /directory/file