473,406 Members | 2,816 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

using include directive causes errors on host 1and1

178 100+
Hi,

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
4 2453
jhardman
3,406 Expert 2GB
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.

Jared
Sep 22 '11 #2
Try to use <!-- #include virtual=""/management/connection.asp" -->
Read the Error message:

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

Michael
Sep 23 '11 #3
jhardman
3,406 Expert 2GB
@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.

Jared
Sep 30 '11 #4
@jhardman
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

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

Similar topics

4
by: *** HAWK | last post by:
I have been creating an ASP site using Dreamweaver MX. I have 2 ASP files, these are "index.asp" and "backend.asp" The "backend.asp" contains all of the relevant code needed to connect to the...
2
by: chopper | last post by:
Please excuse the long post but I can't think of shorter way of explaining the issue. Please could someone advise on the following: I'm writing preview functionality for a CMS written in ASP....
2
by: trying_to_learn | last post by:
im in the primary stages of learning C++. The book im learning from says Dont use using namespace.. directive in header file However im trying to make the following header file.I need to include...
4
by: japh | last post by:
I just started learning c++ and am at the point of using: #include "myclass.cpp" instead of having the class definition in the main file. But I am getting this warning at compile time: ...
1
by: Sameer | last post by:
I have two C# aspx pages( base.aspx and newfile.aspx 1. newfile.aspx only contain ======================= < Response.Write(Session) % =======================
2
by: Farooq Khan | last post by:
can i use include directive in ASP.NET as in classic ASP and how (if it's any different from the classis ASP)? and how can i design/use Server control if i want to replace include file? Best...
1
by: Wallace | last post by:
Hi all, I have a problem on validating a xml fragment using a single namespace schema which spread across multiple schema files using include in the master schema file. No matter how I change...
3
by: Brett R. Wesoloski | last post by:
I am having problems using HttpContext.Current.Request.Url.Host. I have some code that does this... if (HttpContext.Current != null) { subdomain = HttpContext.Current.Request.Url.Host; }
6
by: Bing | last post by:
Hi folks, Is there a way to define a macro that may contain #include directive in its body. If I just put the "#include", it gives error C2162: "expected macro formal parameter" since here I am...
0
by: deegeorge | last post by:
Hi, can i insert a word document using include directive in asp.net. Can u please give a simple example code Thanks in advance
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.