Subject: Include files with "../" on Windows 2003
Posted By: md0004 Post Date: 1/13/2004 2:15:59 AM
I just migrated a site from Windows 2000 (where it worked great) to Windows 2003. I have an include file that references a file in a directory above the current one.

<!--#include file="../filename.asp"-->

Windows 2003 doesn't like this & I can seem to get it to like any path I enter.

Suggestions?
Thanks


Reply By: meow Reply Date: 1/13/2004 2:37:18 AM
Is this an IIS server? I have no experience of IIS but generally speaking 'include file' shouldn't work. It doesn't let you step upwards in the directory tree. Use include virtual instead. It accepts a path relative to the document root.

<!--#include virtual="/virtual/path/to/file.inc" -->

I'm not sure, but you may have another problem there too. I don't know why but often (always?) servers require a space before the end of the 'comment' tag.   

So:  ..." -->
Not: ..."-->

Hope any of that worksw now.

(o<
//\       =^..^=
Reply By: joefawcett Reply Date: 1/13/2004 4:33:22 AM
Another thing is that if you have IIS lockdown set up it forbids resolution of parent paths, i.e. using .. in path names. Look up IIS lockdown on msdn for advice how to modify settings.

Joe

--

Joe

Go to topic 8475

Return to index page 971
Return to index page 970
Return to index page 969
Return to index page 968
Return to index page 967
Return to index page 966
Return to index page 965
Return to index page 964
Return to index page 963
Return to index page 962