Link to home
Start Free TrialLog in
Avatar of romulus020100
romulus020100

asked on

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!
Avatar of xabi
xabi

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

xabi
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
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
ASKER CERTIFIED SOLUTION
Avatar of Paul Maker
Paul Maker
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
makerp: As far as I can see you are proposing an answer that is basicaly the same as my comments ... hmmm interesting

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 ??
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
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 ???????
Avatar of romulus020100

ASKER

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.)
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
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?