Skip to main content
Participant
October 8, 2009
Pregunta

Coldfusion files outside of webroot

  • October 8, 2009
  • 2 respuestas
  • 3687 visualizaciones

Greetings, I haven't used CF in awhile so it's almost like starting over again.  I have the following configuration ColdFusion Version 8 on a Windows platform (development) running IIS vs 5.1.

I placed my application files in a folder outside Inetpub, created the mapping in the CF administrator but for some reason it couldn't "find" the folder/files.  So I added a virtual directory in IIS pointing to it but I still have no luck with getting CF to find my application.

My "default.cfm" file is in /Inetpub/wwwroot/ and it makes calls to all the other files located in /MyAppFolder/SubFolders/

What I get is an HTTP 500 Internal Server Error.....annoying really but I've tried everything I can think of to get it to work.  I don't remember it being a problem when I used CF previously.

Any ideas would be greatly appreciated......

Este tema ha sido cerrado para respuestas.

2 respuestas

October 9, 2009

<quote>

My "default.cfm" file is in /Inetpub/wwwroot/ and it makes calls to all the other files located in /MyAppFolder/SubFolders/

</quote>

Is the second dir CF's root?

How did you map it in CF?

How do you call it from your default.cfm?

Participant
October 13, 2009

I had/have Robust Exception Handling Enabled but still do not get any info from CF on where or what the problem is.

To answer the other questions by GArlington....

<quote>

My "default.cfm" file is in /Inetpub/wwwroot/ and it makes calls to all the other files located in /MyAppFolder/SubFolders/

</quote>

Is the second dir CF's root?   No, the second directory is not in the CF root, the CF root is under Inetpub

How did you map it in CF?  I am not sure what you are asking, I used the CF administrator, went to "mappings" under server settings, gave it the "logical" name and then pointed it to the directory.  It's pretty straight forward and didn't allow for much in the way of "optional" settings.

How do you call it from your default.cfm?  The default.cfm file sitting in wwwroot has an included file that is used for the "menu" (i.e. navigation).  That included file resides in the app folder that is outside Inetpub.  The problem comes when I select one of the menu items from that "included" file.

I guess this is why I am confused, CF seems to "see" the file if it's included, but to make a call directly to it via href does not appear to work.  Maybe I'll try CFlocation.....

Thanks for the answers provided!

ilssac
Inspiring
October 13, 2009

katzenwelt wrote:

I guess this is why I am confused, CF seems to "see" the file if it's included, but to make a call directly to it via href does not appear to work.  Maybe I'll try CFlocation.....

Thanks for the answers provided!

Ah, a hint at last.  A ColdFusion mapping has no effect on the web server and the browser so you can not directly access these files via an href, url connection.  That is the benifit most people desire who use this type of configuration.

If you want to access these files via an href AS WELL AS through cfml <cfinclude...> syntax, you need to have a mapping in your web server for the href.

Remember that ColdFusion mappings are necessary for CFML features such as <cfinclude...> and web server mappings are necessary for directy http request access.  They are both necessary if you want to access content with both methods.

ilssac
Inspiring
October 8, 2009

Make sure you have configured the ColdFusion server to " " under the Debug Output Settings.  Otherwise all ColdFusion errors will be displayed as HTTP 500 errors.

If you do not have this setting configured it could be that you just have a simple syntax error in one of your files that is preventing it from being compiled and this is causing the problem.  With this setting, the compilation errors will be displayed.