How to include an asp file on directory up from where it is?

Posted on 2007-04-06
Last Modified: 2007-04-09
I have included a file in additionaltoolsmain.asp but my include file path is incorrect.  I just haven't seen it.  Do you know what is wrong with the include line.  When I move the file to the root directory, and
take out the "..\" it works just fine.

<!--#include file="..\toolbar.asp"-->
Question by:swansonplace
LVL 67

Assisted Solution

sirbounty earned 50 total points
Comment Utility
What about like
LVL 25

Accepted Solution

kevp75 earned 100 total points
Comment Utility
any chance you can use virtual include?

<!--#include virtual="/toolbar.asp"-->    <---this would be if toolbar.asp is in the websites root...
LVL 54

Assisted Solution

b0lsc0tt earned 50 total points
Comment Utility
Make sure the include isn't within ASP tags.  Also you should use a forward slash.

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

Let me know if you have a question.

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

LVL 49

Assisted Solution

by:Ryan Chong
Ryan Chong earned 50 total points
Comment Utility
If you're using IIS 6.0, you also need to check and ensure you enable include from parent directory, for more info, you can refer to this:

Enable Parent Paths Is Disabled by Default in IIS 6.0

Enabling Parent Paths (IIS 6.0)

Author Comment

Comment Utility
That information did it.  Thank you.  
LVL 54

Expert Comment

Comment Utility
I'm glad I could help.  Thanks for the fun question, the grade and the points.


Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: and…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now