473,408 Members | 2,832 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,408 software developers and data experts.

Include file question

qaz
I run a web site on both a testing server and a "production" server. I
noticed that references to the include file do not work on the testing
server but they do work on the production server. I have to change all
references like this:

<!--#INCLUDE VIRTUAL="include/conndb.asp"-->

to references like this:

<!--#INCLUDE FILE="c:/inetpub/wwwroot/ms/include/conndb.asp"-->

To get the system to work on the testing server.

I think that this must be an IIS question. I am guessing that I have IIS
configured differently on the testing and production servers. What do I
need to change to get the testing server to correctly read the VIRTUAL file
path?

Thanks
Jul 21 '05 #1
6 1632
Why don't you change the testing server's virtual folder structure to match
production. You should never use hard-coded references like c:\ in an
include directive, in my opinion.

--
http://www.aspfaq.com/
(Reverse address to reply.)


"qaz" <ng****@uslex.net> wrote in message
news:#2**************@TK2MSFTNGP15.phx.gbl...
I run a web site on both a testing server and a "production" server. I
noticed that references to the include file do not work on the testing
server but they do work on the production server. I have to change all
references like this:

<!--#INCLUDE VIRTUAL="include/conndb.asp"-->

to references like this:

<!--#INCLUDE FILE="c:/inetpub/wwwroot/ms/include/conndb.asp"-->

To get the system to work on the testing server.

I think that this must be an IIS question. I am guessing that I have IIS
configured differently on the testing and production servers. What do I
need to change to get the testing server to correctly read the VIRTUAL file path?

Thanks

Jul 21 '05 #2
If it's just something small and simple, I'd just have it check the server
it's running on (i.e. whether it's local or not).

e.g.

<%
strServer = Request.ServerVariables("HTTP_HOST")
Select Case lcase(strServer)
Case "server_name"
%>
<!--#INCLUDE VIRTUAL="include/conndb.asp"-->
<%
Case Else
%>
<!--#INCLUDE FILE="c:/inetpub/wwwroot/ms/include/conndb.asp"-->
<%
End Select
%>

Not exactly very efficient, but it works (and saves time changing the paths
;o))

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
"qaz" <ng****@uslex.net> wrote in message
news:#2**************@TK2MSFTNGP15.phx.gbl...
I run a web site on both a testing server and a "production" server. I
noticed that references to the include file do not work on the testing
server but they do work on the production server. I have to change all
references like this:

<!--#INCLUDE VIRTUAL="include/conndb.asp"-->

to references like this:

<!--#INCLUDE FILE="c:/inetpub/wwwroot/ms/include/conndb.asp"-->

To get the system to work on the testing server.

I think that this must be an IIS question. I am guessing that I have IIS
configured differently on the testing and production servers. What do I
need to change to get the testing server to correctly read the VIRTUAL file path?

Thanks

Jul 21 '05 #3
qaz
The file structure is the same.
"Aaron [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Why don't you change the testing server's virtual folder structure to match production. You should never use hard-coded references like c:\ in an
include directive, in my opinion.

--
http://www.aspfaq.com/
(Reverse address to reply.)


"qaz" <ng****@uslex.net> wrote in message
news:#2**************@TK2MSFTNGP15.phx.gbl...
I run a web site on both a testing server and a "production" server. I
noticed that references to the include file do not work on the testing
server but they do work on the production server. I have to change all
references like this:

<!--#INCLUDE VIRTUAL="include/conndb.asp"-->

to references like this:

<!--#INCLUDE FILE="c:/inetpub/wwwroot/ms/include/conndb.asp"-->

To get the system to work on the testing server.

I think that this must be an IIS question. I am guessing that I have IIS configured differently on the testing and production servers. What do I
need to change to get the testing server to correctly read the VIRTUAL

file
path?

Thanks


Jul 21 '05 #4
I didn't say file structure, I said virtual folder structure...

--
http://www.aspfaq.com/
(Reverse address to reply.)

The file structure is the same.

Jul 21 '05 #5
I think he meant, why don't you change the prod serv to match the pub serv,
to allow you to use;

<!--#INCLUDE VIRTUAL="include/conndb.asp"-->

..... on both of them?

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
"qaz" <ng****@uslex.net> wrote in message
news:et**************@TK2MSFTNGP10.phx.gbl...
The file structure is the same.
"Aaron [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Why don't you change the testing server's virtual folder structure to

match
production. You should never use hard-coded references like c:\ in an
include directive, in my opinion.

--
http://www.aspfaq.com/
(Reverse address to reply.)


"qaz" <ng****@uslex.net> wrote in message
news:#2**************@TK2MSFTNGP15.phx.gbl...
I run a web site on both a testing server and a "production" server. I noticed that references to the include file do not work on the testing
server but they do work on the production server. I have to change all references like this:

<!--#INCLUDE VIRTUAL="include/conndb.asp"-->

to references like this:

<!--#INCLUDE FILE="c:/inetpub/wwwroot/ms/include/conndb.asp"-->

To get the system to work on the testing server.

I think that this must be an IIS question. I am guessing that I have IIS configured differently on the testing and production servers. What do I need to change to get the testing server to correctly read the VIRTUAL

file
path?

Thanks



Jul 21 '05 #6
I bet the problem is that the folder c:\inetpub\wwwroot\ms\include is
not the include folder in the root of the web on the production server
like it is on the testing server.

I think I simplified it enough for you to get it after being told twice
before.

qaz wrote:
I run a web site on both a testing server and a "production" server. I
noticed that references to the include file do not work on the testing
server but they do work on the production server. I have to change all
references like this:

<!--#INCLUDE VIRTUAL="include/conndb.asp"-->

to references like this:

<!--#INCLUDE FILE="c:/inetpub/wwwroot/ms/include/conndb.asp"-->

To get the system to work on the testing server.

I think that this must be an IIS question. I am guessing that I have IIS
configured differently on the testing and production servers. What do I
need to change to get the testing server to correctly read the VIRTUAL file
path?

Thanks


--
Please do not contact me directly or ask me to contact you directly for
assistance.

If your question is worth asking, it's worth posting.

If it’s not worth posting you should have done a search on
http://www.google.com/ http://www.google.com/grphp?hl=en&tab=wg&q= or
http://news.google.com/froogle?hl=en&tab=nf&ned=us&q= before wasting our
time.
Jul 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: michaaal | last post by:
I have two folders in my website... Folder1 (this is where my #include file is, this is where the style.css is) --Folder2 (Folder2 is inside of Folder1) Folder2 contains a file that has...
6
by: alan | last post by:
Dear all, I have written my own function by C. And my development platform is W2k with VC6.0. Then I also defined a header file to extern declare this function. After that, I include this...
3
by: Arpi Jakab | last post by:
I have a main project that depends on projects A and B. The main project's additional include directories list is: ...\ProjectA\Dist\Include ...\ProjectB\Dist\Include Each of the include...
4
by: Jon | last post by:
All, I have a question regarding include files. I'm currently wanting to secure all of the pages within a directory by having a login script that queries a MySQL DB, and writes a session...
3
by: sunnylele | last post by:
Hi, all, I have a question on the use of #include: #include <unistd.h> #include <asm/unistd.h> #include "nn.h" What are the differences between the above three usages? It seems the third...
7
by: Wojtek | last post by:
Hello, how can I transparently insert one XML file into another? I am looking for a method simmilar to the #include <file> known from the C language. To be more precise, an example: I have...
2
by: key9 | last post by:
Hi all look at the organize tree main.c ------ #include lib_adapter.c main() { foo();
12
by: TMN | last post by:
Hi All I am new to PHP and I do not understand why the following works ?? $file=urlencode("displayIncidents.php"); echo "<a href=statistics.php?fileName=$file&delete=true>Delete...
8
by: The Cool Giraffe | last post by:
One thing i do know for sure. When one creates a CPP file, one needs to include the H file. Now, having said that, i wonder if there are some general hints, requirements or standard guide lines on...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.