Solved

SSIs -- ASP? HTM? IIS?

Posted on 2000-03-09
11
293 Views
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!
0
Comment
Question by:romulus020100
11 Comments
 
LVL 8

Expert Comment

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

xabi
0
 
LVL 8

Expert Comment

by:xabi
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.

xabi
0
 
LVL 8

Expert Comment

by:xabi
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.

xabi
0
 
LVL 10

Accepted Solution

by:
makerp earned 100 total points
ID: 2600715
<!--#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
 
LVL 8

Expert Comment

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

0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 10

Expert Comment

by:makerp
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 ??
0
 
LVL 8

Expert Comment

by:xabi
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.

xabi
0
 
LVL 10

Expert Comment

by:makerp
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 ???????
0
 

Author Comment

by:romulus020100
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.)
0
 

Expert Comment

by:yfud
ID: 3472593
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
 

Expert Comment

by:KeithM
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?
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

744 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