Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Include file question
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



Report this thread to moderator Post Follow-up to this message
Old Post
qaz
10-21-04 08:55 PM


Re: Include file question
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" <ngnews@uslex.net> wrote in message
news:#2C1U72tEHA.2680@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
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Aaron [SQL Server MVP]
10-21-04 08:55 PM


Re: Include file question
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" <ngnews@uslex.net> wrote in message
news:#2C1U72tEHA.2680@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
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Steven Burn
10-21-04 08:55 PM


Re: Include file question
The file structure is the same.


"Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message
news:%23rgYFF3tEHA.1276@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" <ngnews@uslex.net> wrote in message
> news:#2C1U72tEHA.2680@TK2MSFTNGP15.phx.gbl... 
IIS 
> file 
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
qaz
10-21-04 08:55 PM


Re: Include file question
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.



Report this thread to moderator Post Follow-up to this message
Old Post
Aaron [SQL Server MVP]
10-21-04 08:55 PM


Re: Include file question
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" <ngnews@uslex.net> wrote in message
news:etVRWJ3tEHA.3680@TK2MSFTNGP10.phx.gbl...
> The file structure is the same.
>
>
> "Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message
> news:%23rgYFF3tEHA.1276@TK2MSFTNGP12.phx.gbl... 
> match 
I 
all 
> IIS 
I 
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Steven Burn
10-21-04 08:55 PM


Re: Include file question
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 fil
e
> 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.

Report this thread to moderator Post Follow-up to this message
Old Post
Joker
10-22-04 08:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

ASP archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:35 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.