Argrggh - host doesn't support server-side includes

A

Alan Howard

I've just been caught out by a host that doesn't support #includes in my
ASPs. What's the best strategy for replacing these calls to files that
include everything from subs and functions, global constants, other
#includes, script directives, etc.??

Thanks,

Alan
 
A

Aaron Bertrand [MVP]

Server.Execute, maybe. But you'll have to re-think your architecture quite
a bit.

I agree with Steven... find a new host. I can't think of a good reason for
a host to disable #includes, and I've never come across one that did so.

(What happens, by the way, when you run an ASP page with an #include
directive?)
 
A

Alan Howard

Thanks Aaron. I'm still trying to find out why they have SSI disabled - they
are one of the better hosts in NZ and this caught me completely by surprise.
(What happens, by the way, when you run an ASP page with an #include
directive?)

The #include directives are ignored and are treated like any other HTML
comment - i.e. they do nothing but are still viewable if you 'View Source'.

Cheers,

Alan
 
A

Aaron Bertrand [MVP]

The #include directives are ignored and are treated like any other HTML
comment - i.e. they do nothing but are still viewable if you 'View
Source'.

Yuck. Tell them to fix it or you'll move on.

A
 
A

Alan Howard

Any thoughts on how they've turned SSI off? I had a quick look but couldn't
see anything.

Alan
 
A

Aaron Bertrand [MVP]

Any thoughts on how they've turned SSI off? I had a quick look but
couldn't
see anything.

To be honest, I don't know. It sounds more like ASP isn't processing, as I
know of no way to turn off the preprocessor that would catch the #include
file directive(s). Are you sure the extension is ASP, and that other ASP
code in the page is running? You can disable <!--#EXEC using the
SSIExecDisable key in the metabase. But you can't disable <!--#include
directives that I know of.

A
 
A

Alan Howard

They've either 'turned SSI on' since I complained and asked for an
explanation, or it was never off in the first place and I was just dealing
with a misconfigured hosting account and a help-desk staffer that didn't
know what they were talking about. In either case, #includes seem to be
getting processed now so for the time-being, I'm happy.

Cheers,

Alan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top