Posted on 2000-03-09
Last Modified: 2013-11-18
This question could be posted in a number of places, but I'm guessing this forum is best.

I'm trying to redo a website, using server side includes for the left nav bar and footer that are on every page. The site is on an IIS (4.0) server, staged on a 2K server.

It doesn't work in either. The syntax

<!--#include virtual="/includes/leftnavbar_inc.stm" -->

is ignored. I tried it in an htm file, I tried changing it to an ASP extension (in the first case, it's just ignored. In the second, it says it can't find teh include file, which is located where it is supposed to be).

I've messed with file names, locations, extensions, etc. I created very simplified test files. No luck. I'm not sure if the problem is in the code, or with server side configuration: I think there may be some server side config that needs to be done. The MS techbase sucks on this one -- it's SSI notes don't seem to go beyond IIS 3.0, and the subject isn't mentioned in any Win2K documentation.

Any suggestions? Cheers!
Question by:romulus020100
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 2600660
Did you try naming the files .shtml instead of .html?


Expert Comment

ID: 2600673
You can also open your Microsoft Management Console and open yoir web properties, the COnfiguracion and then App Mappings. There you can add .html and asociate the extention to "c:\WINNT\System32\inetsrv\ssinc.dll" This is for NT 4 but under 2K it must be the same or similar.


Expert Comment

ID: 2600688
The format of:

<#include ..> is this one:

<!--#include virtual="value" -->
<!--#include file="value" -->

virtual gives a virtual path to a document on the server. You must access a normal file this way, you cannot access a CGI script in this fashion. You can, however, access another parsed document.

file gives a pathname relative to the current directory. ../ cannot be used in this pathname, nor can absolute paths be used. As above, you can send other parsed documents, but you cannot send CGI scripts.

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

LVL 10

Accepted Solution

makerp earned 100 total points
ID: 2600715
<!--#include PathType=strFileName -->

where path type is

'file' for paths/files relative to the current directory


'virtual' for paths which are a complete virtual path in your web server

<!-- #include file="" -->

will include the file that is located in the current dir

microsoft suggest using .inc as the extension for all include files. why i dont know but they do !!.

server side includes cannot

     include other files
     contain pre-processor directives
various other pre-processor directives exist such as

#exec 'includes the output from an exe in your script
#fsize 'inserts the size of the current file

asp in a nutshell says that extensions of ssi must be mapped to the ssinc.dll. now i bet .inc is mapped for you. ive used it many times and have not had to configure anything.

also ssi must be out side of the <%...%> delimiters

hope this help

Expert Comment

ID: 2600983
makerp: As far as I can see you are proposing an answer that is basicaly the same as my comments ... hmmm interesting

LVL 10

Expert Comment

ID: 2601096
your comments were not there when i was writting (look at the times) my awnser, but yes i will agree with you and if it makes you happy i shall withdraw it to a comment ??

Expert Comment

ID: 2601216
I'm not worried about the points or any other thing, it's just I don't like to write a comment to a question and somebody else without givng more information gives an answer, you know ...

Sorry for my comment. And don't worry sometines I crosspost too.

LVL 10

Expert Comment

ID: 2601266
thats cool,

back to the subject though.. ive been messing about with ssi's and using extensions which i aint set up/registered and they are working ???????

Author Comment

ID: 2601363
Thanks for the answer -- it did a good job of pulling together the server side and scripting stuff. Just FYI, the answer to my particular problem turned out to be something entirely different, and quite tweaky -- I use Homesite, which sticks an HTTP header at the top of every file. Aparently, that header was what was choking the include process (cause when I removed it, it worked.)

Expert Comment

ID: 3472593

if your still out there I could greatly use your help. I have a problem that sounds EXACTLY like yours and I've changed the extensions, directories, etc., and even cleared the http: header dropped in by homesite and still no luck I would greatly appreciate a chance to get some more info from you on how you made it work.


Expert Comment

ID: 4321514
If anyone is still following this, I'm apparently having the same problem and I am getting absolutely nowhere.  SSIs are critical to what I am doing and despite my many configurations my .asp pages still aren't including them properly.  Anyone out there feeling helpful?

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Help with query 3 41
Html Table Looping (part 2) 5 39
Code Coverage and Coding Standards 2 76
Help with Classic ASP - Parameterizing Query 16 60
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

738 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