Click to See Complete Forum and Search --> : SSI not working with asp extensions


flemmo
05-11-2003, 11:41 AM
Hi,

I'm quite new to this so feel free to put me right If I'm going about this wrong.

I'm building a site that uses server-side includes to display the navigation menu on each page.
From the reading that I have done I have done the following:
- all my pages are asp
- the ssi is also asp
- the ssi does not contain <html> or <body> tags
- the include code I use is <!-- #INCLUDE FILE="ssi.asp" -->
- the ssi is in the same directory as all asp pages

I have installed IIS and everything works fine.
However when uploaded to my webspace the include code is not processed, resulting in the asp page without the menu.
When I change all the extensions/code to shtml it works.

I really need to be using asp not shtml. Am I doing it wrong or is there another reason why includes in an asp dont work e.g. server settings?

I have tried the code on both my hostonfly webspace and freeserve. Both only work with shtml extension.

Thanks in advance.

flemmo
05-11-2003, 02:23 PM
erm, not sure...

Here is the code from one of the pages calling the menu

<%@ LANGUAGE="VBSCRIPT" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<!--#include file="ssi.asp" -->
<table width="730" height="486" border="0" align="center" cellpadding="2" cellspacing="0" bgcolor="#CCCCCC">
<tr>
<td><table width="730" height="486" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td valign="top"><img src="images/titles/about.gif" width="126" height="29"></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>

flemmo
05-12-2003, 02:26 AM
Yes i've installed IIS on my home PC under Windows XP.
I dont have any asp code at the moment, I've just named the html coded files with an asp extension. Could that be the problem? Does the include need to connect to a database or something?

on my same webspace I have a University project using PHP/SQL and the asp is processed fine - so the server is set up for asp extensions.

Thanks for your help.

flemmo
05-12-2003, 09:31 AM
I just meant files with .asp extension containing PHP.

Looked on hostonfly website. It says they support includes, so I dont know whats going wrong!

flemmo
05-12-2003, 06:00 PM
I emailed hostonfly about the problem and received:

SSI can be used only inside shtml files. There's no possibility to change this

So there you go, it was the server all along! Though why it doesnt work with asp and only shtml is a mystery.