By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,868 Members | 1,991 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,868 IT Pros & Developers. It's quick & easy.

using include directive causes errors on host 1and1

P: 178

I am migrating a domain from one host to another. Where the code uses the includes directive I keep getting errors from the 1and1 host.

if I include the line below I get a 500 error.
Expand|Select|Wrap|Line Numbers
  1. <!--#include file="/management/connection.asp"-->
Would this be something to do with permissions on server?
Sep 20 '11 #1
Share this Question
Share on Google+
4 Replies

Expert 2.5K+
P: 3,405
This is absolutely a hosting issue. Even though we commonly use includes in asp pages, it is actually a different technology and the server has to look for those separately from (and before) executing the script. With a full service host, I'm not even sure how you could get that feature turned on. You might want to consider switching to using the global.asx for shared code, that should still work.

Sep 22 '11 #2

P: 16
Try to use <!-- #include virtual=""/management/connection.asp" -->
Read the Error message:

Once again: either you use "file="../management/..." or "virtual="/management/..."

Sep 23 '11 #3

Expert 2.5K+
P: 3,405
@multinett please tell me I'm speaking nonsense in English, this is an English-language forum.

I'd be surprised if switching from "include file" to "include virtual" made a difference, but it might be worth trying.

I stand by my earlier statement that server-side includes (SSIs) are not an integral part of ASP, we just tend to use them that way. On the IIS server, SSIs are turned on and off separate from scripting. When they are performed the server will execute those using a different process before executing the script.

I have a site hosted on 1and1, but it is php so I wouldn't be able to test. Try multinett's suggestion, but I fear SSIs are disabled. If that is the case, changing the syntax will have no effect.

Sep 30 '11 #4

P: 16
sorry - i assume, that ssi is always possible - maybe i'm wrong.
But if you are using "virtual=" you have not to think about - wether the "parent paths are activated" (german expression is: "übergeordnete pfade aktivieren".

with "file="/mypath" you will always get an error because it is not allowed to begin the path expression with a "/". Only a relative Path is allowed like "file="../mypath" - but it depends of the server settings (übergeordnete pfade müssen aktiviert sein)

virtual="/mypath" should work always.
Oct 20 '11 #5

Post your reply

Sign in to post your reply or Sign up for a free account.