SSIs -- ASP? HTM? IIS?

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!
romulus020100Asked:
Who is Participating?
 
makerpConnect With a Mentor Commented:
<!--#include PathType=strFileName -->

where path type is

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

or

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

<!-- #include file="db_util.inc" -->

will include the file db_util.inc 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
0
 
xabiCommented:
Did you try naming the files .shtml instead of .html?

xabi
0
 
xabiCommented:
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.

xabi
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
xabiCommented:
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.

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

0
 
makerpCommented:
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 ??
0
 
xabiCommented:
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.

xabi
0
 
makerpCommented:
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 ???????
0
 
romulus020100Author Commented:
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.)
0
 
yfudCommented:
romulus,

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.

yfud
0
 
KeithMCommented:
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?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.