Marshall University Logo
Web Development
FULL SEARCH
 
 

MU Home
Choose Option from Navigation Bar

SEARCH
WEB DEVELOPMENT

LINKS
Latest Updates
About MU Web
Tutorials/Guides
Web Resources
Policies


Include Statements Do Not Work

With the web server upgrade, the ability to use parent paths in Include statements has been disabled. If your web pages use these paths in include statements (ex. <!--#include file="../temp_header.html" -->), the page will cause an error and will not be displayed. For an .asp document, the error will look something like this:

Active Server Pages error 'ASP 0131'
Disallowed Parent Path
/yoursite/yourdir/yourpage.asp, line 22
The Include file '../yourfile.html' cannot contain '..' to indicate the parent directory.

In order to fix this problem, you need to edit the code of the page with the error. You can do this by opening the page in FrontPage and selecting the Code view.

1. First locate the ASP include statements; they begin with <!--# include file=.

2. Replace the word file with the word virtual.

3. Determine the complete URL of the file to be included. (ex. If the file to be included is in your site's root directory, it's URL would be http://www.marshall.edu/yoursite/yourfile.html)

4. Replace the contents of the quotation mark with the part of the URL that comes after http://www.marshall.edu

So our example include statement that started out as...

<!--# include file="../yourfile.html" -->
...would now appear as...
<!--# include virtual="/yoursite/yourfile.html" -->

Now the server will know exactly where to find the file you wanted to include, and your site will function just as it did before.

 



Site Maintained by the University Web Administrator. Copyright ©2008 Marshall University. All Rights Reserved.
Read Site Disclaimer and Privacy Policy for more information.
Marshall University - One John Marshall Drive - Huntington, WV 25755

 
Link to Electronic Directory Link to Contact Information Link to Campus Map Link to Site Index