Laughing at the stony face of gloom

(your instinct can’t be wrong)

Server Side Includes on IIS 6.0

leave a comment »

As is often the case, a department comes to us with a piece of software they’ve bought; they smile sweetly and say “by the way, we need this installed and working by the end of the week”…

This time around though, it’s some sort of web-based package. And it needs server side includes… turned on… Not usually a problem with IIS as .asp/.aspx pages will (I’m told, and have a vague recollection of) by default do server side includes without anything special needing to be put in place. That’s nice. However this application uses “proper” server side includes (or “historical, outdated and outmoded” server side includes… depending on your point of view), which means .shtml pages … which, by default IIS has no idea what to do with.

So, what do we need to do to remedy this?

Well, first we need to allow the server side extension.

in the IIS manager
computer name
|- Web Service Extensions

Server Side Includes (highlight then click “Allow”)

If there isn’t a Server Side Extension already there, we can add one. Select “Add a new Web Service Extension” ; the extension name will be : Server Side Includes – the required file is ssinc.dll – this is usually located in c:\windows\system32\inetsrv\ssinc.dll

That should be it… except in this case, it’s not.

These files use a “include virtual” directive rather than an “include file” directive (the installation notes, helpfully say

“If you have problems getting the server side includes to work, simply manually change the virtual to file” … sounds simple … except there are 441 shtml files to manually edit… FUN? Not!

(A quick test shows that their solution will work… but I don’t want to make hundreds of edits; so there must be a way of making the virtual directive work…. it is supported by IIS after all… The virtual directive meaning something along the lines of “a directory that exists relative to the virtual directory” )

So … could I make a simple virtual directory for this site ?

computer says… “no”

– I think the problem is that I need to do a virtual directory for each of the folders… let’s try that with one of the pages…


It looks like, when the include virtual directive is issued, we need to actually have a virtual directory of that name – or something along those lines (I’m guessing here – I’ll do some proper thinking tomorrow on work’s time :) )


Written by Mas

May 20, 2008 at 10:06 pm

Posted in web servers

Tagged with , , ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: