Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

combination of parent paths and virtual include problem

Status
Not open for further replies.

jimshew

MIS
Feb 10, 2004
10
0
0
US
Hi,
I can't seem to get my IIS6 ASP application to include .inc files with "include virtual". Parent paths are on, but any file with a .inc results in a 500 File not found error. IIS log says: ASP_0126|Include_file_not_found 80

Any ideas? I've tried to add inc as a file extension, but I didn't need to do this with IIS5.

It does appear to be a problem with "../adovbs.inc" instead of "/adovbx.inc". Normal .asp files work fine with .. notations.
 
Post a sample of your code. Without seeing what you've got, there's no way to offer any help.
 
I would use .asp rather than .inc for your include files anyway as .asp can't be downloaded through the browser but .inc file can.

BDC.
 
Log line:
POST /admin/edit_announ_action.asp ID=3|3|ASP_0126|Include_file_not_found 80 - x.x.x.x Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.0;+.NET+CLR+1.1.4322) 500 0 0

Code lines:
<%@ Language=VBScript %>
<% Option Explicit %>
<!--#include virtual=&quot;../adovbs.inc&quot;-->
<%
Dim objConn
. . .

So if I use &quot;/adovbs.inc&quot; it is fine, or if I use an &quot;../adovbs.asp&quot; it is fine. If this was my site I woudl just change it, but it is a client's developed by somebody else, so I'd like to make it behave instead of changing the code. Thanks!
 
This thread might help thread333-734421

BDC.
 
Thanks!

after rereading on microsoft.com, it's not that &quot;../&quot; isn't allowed in an include, it just can't ultimately lead to a parent directory (can be used for /admin/../adovbs.inc from the / dir)

Silly. Thanks for your help, I just needed the part where I can point to that says &quot;cannot be done&quot;. Now that I have the MS link to:

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top