|
 |
asp_databases thread: Server-Side Include
Message #1 by "Hiro Shiratori" <hiro-shiratori@m...> on Mon, 7 Jan 2002 16:01:48 -0800
|
|
Hi, I have a strange behavior on the Server-Side Include file.
This is a file called "checkuser.inc"
---------------------------------------------------------------
<!-- SSI CheckUser Start -->
<%
'
Dim strRequest
'
' get requested page (me!)
strRequest =3D "http://"
strRequest =3D strRequest & Request.ServerVariables("SERVER_NAME")
strRequest =3D strRequest & Request.ServerVariables("PATH_INFO")
'
If Session.Contents("User")=3D"" Then
Session.Contents("RequestedURL")=3DstrRequest
Response.Redirect "ProductTransaction/getuser.asp"
End If
%>
<!-- SSI CheckUser End -->
---------------------------------------------------------------
When I place the #include statement on the LogIn.asp as follows:
---------------------------------------------------------------
<%@ LANGUAGE=3DVBScript %>
<%
Response.Buffer=3DTrue
%>
<!-- #include file=3DProductTransaction/checkuser.inc -->
---------------------------------------------------------------
I get an error message as HTTP 500 Internal Server Error.
However, when I misspell the word "include" to "includde" (as you can
see "double d"), everything works.
Does anyone have any idea what is causing this strange behavior?
It will be greatly appreciated if you could give any suggestions.
Best regards,
Hiro
Message #2 by "Tomm Matthis" <matthis@b...> on Tue, 8 Jan 2002 07:20:59 -0500
|
|
Try enclosing the file name in quotations.
-- Tomm
> -----Original Message-----
> From: Hiro Shiratori [mailto:hiro-shiratori@m...]
> Sent: Monday, January 07, 2002 7:02 PM
> To: ASP Databases
> Subject: [asp_databases] Server-Side Include
>
>
> Hi, I have a strange behavior on the Server-Side Include file.
>
> This is a file called "checkuser.inc"
> ---------------------------------------------------------------
> <!-- SSI CheckUser Start -->
> <%
> '
> Dim strRequest
> '
> ' get requested page (me!)
> strRequest = "http://"
> strRequest = strRequest & Request.ServerVariables("SERVER_NAME")
> strRequest = strRequest & Request.ServerVariables("PATH_INFO")
> '
> If Session.Contents("User")="" Then
> Session.Contents("RequestedURL")=strRequest
> Response.Redirect "ProductTransaction/getuser.asp"
> End If
> %>
> <!-- SSI CheckUser End -->
> ---------------------------------------------------------------
>
> When I place the #include statement on the LogIn.asp as follows:
> ---------------------------------------------------------------
> <%@ LANGUAGE=VBScript %>
> <%
> Response.Buffer=True
> %>
> <!-- #include file=ProductTransaction/checkuser.inc -->
> ---------------------------------------------------------------
> I get an error message as HTTP 500 Internal Server Error.
>
> However, when I misspell the word "include" to "includde" (as you
> can see "double d"), everything works.
>
> Does anyone have any idea what is causing this strange behavior?
>
> It will be greatly appreciated if you could give any suggestions.
>
> Best regards,
> Hiro
>
>
> $subst('Email.Unsub').
Message #3 by "Hiro Shiratori" <hiro-shiratori@m...> on Tue, 8 Jan 2002 15:04:46 -0800
|
|
Hello, Tomm:
Thanks for suggestion.
I've tried both single and double quotations, but they didn't work.
Only the word "includde" (double ds) works.
<!-- #includde file=3DProductTransaction/checkuser.inc -->
or
<!-- #includde file=3D"ProductTransaction/checkuser.inc" -->
At this point, I'm not sure if the login.asp's security is assured or
not.
Do you know where the problem is coming from?
Best regards,
Hiro
----- Original Message -----
From: "Tomm Matthis" <matthis@b...>
To: "ASP Databases" <asp_databases@p...>
Sent: Tuesday, January 08, 2002 4:20 AM
Subject: [asp_databases] RE: Server-Side Include
> Try enclosing the file name in quotations.
>
> -- Tomm
>
> > -----Original Message-----
> > From: Hiro Shiratori [mailto:hiro-shiratori@m...]
> > Sent: Monday, January 07, 2002 7:02 PM
> > To: ASP Databases
> > Subject: [asp_databases] Server-Side Include
> >
> > Hi, I have a strange behavior on the Server-Side Include file.
> >
> > This is a file called "checkuser.inc"
> > ---------------------------------------------------------------
> > <!-- SSI CheckUser Start -->
> > <%
> > '
> > Dim strRequest
> > '
> > ' get requested page (me!)
> > strRequest =3D "http://"
> > strRequest =3D strRequest & Request.ServerVariables("SERVER_NAME")
> > strRequest =3D strRequest & Request.ServerVariables("PATH_INFO")
> > '
> > If Session.Contents("User")=3D"" Then
> > Session.Contents("RequestedURL")=3DstrRequest
> > Response.Redirect "ProductTransaction/getuser.asp"
> > End If
> > %>
> > <!-- SSI CheckUser End -->
> > ---------------------------------------------------------------
> >
> > When I place the #include statement on the LogIn.asp as follows:
> > ---------------------------------------------------------------
> > <%@ LANGUAGE=3DVBScript %>
> > <%
> > Response.Buffer=3DTrue
> > %>
> > <!-- #include file=3DProductTransaction/checkuser.inc -->
> > ---------------------------------------------------------------
> > I get an error message as HTTP 500 Internal Server Error.
> >
> > However, when I misspell the word "include" to "includde" (as you
> > can see "double d"), everything works.
> >
> > Does anyone have any idea what is causing this strange behavior?
> >
> > It will be greatly appreciated if you could give any suggestions.
> >
> > Best regards,
> > Hiro
> >
> > $subst('Email.Unsub').
>
$subst('Email.Unsub').
Message #4 by "Phil Sayers" <philipsayers@m...> on Tue, 8 Jan 2002 18:51:57 -0500
|
|
You need to turn off the
Friendly error messages in internet explorer.
Goto tools menu, choose options.
Goto advanced tab. Uncheck the "show friendly error messages"
Re run code, and see what error you get
-----Original Message-----
From: Hiro Shiratori [mailto:hiro-shiratori@m...]
Sent: Tuesday, January 08, 2002 6:05 PM
To: ASP Databases
Subject: [asp_databases] RE: Server-Side Include
Advertise on P2P or become an official list sponsor.
Would you like your message to reach as many as 36,000
professionals? Or 92,000? Or maybe even 1 million?
Contact us (verag@w...) for more information on
banner, button and newsletter advertising.
---
Hello, Tomm:
Thanks for suggestion.
I've tried both single and double quotations, but they didn't work.
Only the word "includde" (double ds) works.
<!-- #includde file=ProductTransaction/checkuser.inc -->
or
<!-- #includde file="ProductTransaction/checkuser.inc" -->
At this point, I'm not sure if the login.asp's security is assured or
not.
Do you know where the problem is coming from?
Best regards,
Hiro
----- Original Message -----
From: "Tomm Matthis" <matthis@b...>
To: "ASP Databases" <asp_databases@p...>
Sent: Tuesday, January 08, 2002 4:20 AM
Subject: [asp_databases] RE: Server-Side Include
> Try enclosing the file name in quotations.
>
> -- Tomm
>
> > -----Original Message-----
> > From: Hiro Shiratori [mailto:hiro-shiratori@m...]
> > Sent: Monday, January 07, 2002 7:02 PM
> > To: ASP Databases
> > Subject: [asp_databases] Server-Side Include
> >
> > Hi, I have a strange behavior on the Server-Side Include file.
> >
> > This is a file called "checkuser.inc"
> > ---------------------------------------------------------------
> > <!-- SSI CheckUser Start -->
> > <%
> > '
> > Dim strRequest
> > '
> > ' get requested page (me!)
> > strRequest = "http://"
> > strRequest = strRequest & Request.ServerVariables("SERVER_NAME")
> > strRequest = strRequest & Request.ServerVariables("PATH_INFO")
> > '
> > If Session.Contents("User")="" Then
> > Session.Contents("RequestedURL")=strRequest
> > Response.Redirect "ProductTransaction/getuser.asp"
> > End If
> > %>
> > <!-- SSI CheckUser End -->
> > ---------------------------------------------------------------
> >
> > When I place the #include statement on the LogIn.asp as follows:
> > ---------------------------------------------------------------
> > <%@ LANGUAGE=VBScript %>
> > <%
> > Response.Buffer=True
> > %>
> > <!-- #include file=ProductTransaction/checkuser.inc -->
> > ---------------------------------------------------------------
> > I get an error message as HTTP 500 Internal Server Error.
> >
> > However, when I misspell the word "include" to "includde" (as you
> > can see "double d"), everything works.
> >
> > Does anyone have any idea what is causing this strange behavior?
> >
> > It will be greatly appreciated if you could give any suggestions.
> >
> > Best regards,
> > Hiro
> >
> > $subst('Email.Unsub').
>
$subst('Email.Unsub').
$subst('Email.Unsub').
Message #5 by "Drew, Ron" <RDrew@B...> on Wed, 9 Jan 2002 08:40:31 -0500
|
|
Depending on how the directory structure looks could be the problem.
Using the double quotes try...
<!-- #include file=3D"../ProductTransaction/checkuser.inc" -->
-----Original Message-----
From: Hiro Shiratori [mailto:hiro-shiratori@m...]
Sent: Tuesday, January 08, 2002 6:05 PM
To: ASP Databases
Subject: [asp_databases] RE: Server-Side Include
Advertise on P2P or become an official list sponsor.
Would you like your message to reach as many as 36,000
professionals? Or 92,000? Or maybe even 1 million?
Contact us (verag@w...) for more information on
banner, button and newsletter advertising.
---
Hello, Tomm:
Thanks for suggestion.
I've tried both single and double quotations, but they didn't work.
Only the word "includde" (double ds) works.
<!-- #includde file=3DProductTransaction/checkuser.inc -->
or
<!-- #includde file=3D"ProductTransaction/checkuser.inc" -->
At this point, I'm not sure if the login.asp's security is assured or
not. Do you know where the problem is coming from?
Best regards,
Hiro
----- Original Message -----
From: "Tomm Matthis" <matthis@b...>
To: "ASP Databases" <asp_databases@p...>
Sent: Tuesday, January 08, 2002 4:20 AM
Subject: [asp_databases] RE: Server-Side Include
> Try enclosing the file name in quotations.
>
> -- Tomm
>
> > -----Original Message-----
> > From: Hiro Shiratori [mailto:hiro-shiratori@m...]
> > Sent: Monday, January 07, 2002 7:02 PM
> > To: ASP Databases
> > Subject: [asp_databases] Server-Side Include
> >
> > Hi, I have a strange behavior on the Server-Side Include file.
> >
> > This is a file called "checkuser.inc"
> > ---------------------------------------------------------------
> > <!-- SSI CheckUser Start -->
> > <%
> > '
> > Dim strRequest
> > '
> > ' get requested page (me!)
> > strRequest =3D "http://"
> > strRequest =3D strRequest & Request.ServerVariables("SERVER_NAME")
> > strRequest =3D strRequest & Request.ServerVariables("PATH_INFO")
> > '
> > If Session.Contents("User")=3D"" Then
> > Session.Contents("RequestedURL")=3DstrRequest
> > Response.Redirect "ProductTransaction/getuser.asp"
> > End If
> > %>
> > <!-- SSI CheckUser End -->
> > ---------------------------------------------------------------
> >
> > When I place the #include statement on the LogIn.asp as follows:
> > ---------------------------------------------------------------
> > <%@ LANGUAGE=3DVBScript %>
> > <%
> > Response.Buffer=3DTrue
> > %>
> > <!-- #include file=3DProductTransaction/checkuser.inc -->
> > ---------------------------------------------------------------
> > I get an error message as HTTP 500 Internal Server Error.
> >
> > However, when I misspell the word "include" to "includde" (as you
> > can see "double d"), everything works.
> >
> > Does anyone have any idea what is causing this strange behavior?
> >
> > It will be greatly appreciated if you could give any suggestions.
> >
> > Best regards,
> > Hiro
> >
> > $subst('Email.Unsub').
>
$subst('Email.Unsub').
$subst('Email.Unsub').
Message #6 by "Tomm Matthis" <matthis@b...> on Wed, 9 Jan 2002 11:44:17 -0500
|
|
Sorry Hiro... you have a certified "weird one" here...
-- Tomm
> -----Original Message-----
> From: Hiro Shiratori [mailto:hiro-shiratori@m...]
> Sent: Tuesday, January 08, 2002 6:05 PM
> To: ASP Databases
> Subject: [asp_databases] RE: Server-Side Include
>
>
> Advertise on P2P or become an official list sponsor.
>
> Would you like your message to reach as many as 36,000
> professionals? Or 92,000? Or maybe even 1 million?
> Contact us (verag@w...) for more information on
> banner, button and newsletter advertising.
> ---
> Hello, Tomm:
>
> Thanks for suggestion.
> I've tried both single and double quotations, but they didn't work.
>
> Only the word "includde" (double ds) works.
> <!-- #includde file=ProductTransaction/checkuser.inc -->
> or
> <!-- #includde file="ProductTransaction/checkuser.inc" -->
> At this point, I'm not sure if the login.asp's security is assured or not.
> Do you know where the problem is coming from?
>
> Best regards,
> Hiro
>
> ----- Original Message -----
> From: "Tomm Matthis" <matthis@b...>
> To: "ASP Databases" <asp_databases@p...>
> Sent: Tuesday, January 08, 2002 4:20 AM
> Subject: [asp_databases] RE: Server-Side Include
>
>
> > Try enclosing the file name in quotations.
> >
> > -- Tomm
> >
> > > -----Original Message-----
> > > From: Hiro Shiratori [mailto:hiro-shiratori@m...]
> > > Sent: Monday, January 07, 2002 7:02 PM
> > > To: ASP Databases
> > > Subject: [asp_databases] Server-Side Include
> > >
> > > Hi, I have a strange behavior on the Server-Side Include file.
> > >
> > > This is a file called "checkuser.inc"
> > > ---------------------------------------------------------------
> > > <!-- SSI CheckUser Start -->
> > > <%
> > > '
> > > Dim strRequest
> > > '
> > > ' get requested page (me!)
> > > strRequest = "http://"
> > > strRequest = strRequest & Request.ServerVariables("SERVER_NAME")
> > > strRequest = strRequest & Request.ServerVariables("PATH_INFO")
> > > '
> > > If Session.Contents("User")="" Then
> > > Session.Contents("RequestedURL")=strRequest
> > > Response.Redirect "ProductTransaction/getuser.asp"
> > > End If
> > > %>
> > > <!-- SSI CheckUser End -->
> > > ---------------------------------------------------------------
> > >
> > > When I place the #include statement on the LogIn.asp as follows:
> > > ---------------------------------------------------------------
> > > <%@ LANGUAGE=VBScript %>
> > > <%
> > > Response.Buffer=True
> > > %>
> > > <!-- #include file=ProductTransaction/checkuser.inc -->
> > > ---------------------------------------------------------------
> > > I get an error message as HTTP 500 Internal Server Error.
> > >
> > > However, when I misspell the word "include" to "includde" (as you
> > > can see "double d"), everything works.
> > >
> > > Does anyone have any idea what is causing this strange behavior?
> > >
> > > It will be greatly appreciated if you could give any suggestions.
> > >
> > > Best regards,
> > > Hiro
> > >
> > > $subst('Email.Unsub').
> >
> $subst('Email.Unsub').
>
>
> $subst('Email.Unsub').
Message #7 by "Hiro Shiratori" <hiro-shiratori@m...> on Wed, 9 Jan 2002 14:41:48 -0800
|
|
Hello, folks, thanks for your comments and suggestions.
I've cleaned and re-created the project to start all over.
Project Name: ProductTransaction
Then I created the sub folder as LogIn.
This sub folder LogIn contains Getuser.asp, Verifyuser.asp,
Checkuser.inc, Userlist.txt, Default.asp, Sample.asp.
When default.asp is trying to open, an error occurs as follows:
Active Server Pages error 'ASP 0126'
Include file not found
/ProductTransaction/LogIn/default.asp, line 6
The include file 'ProductTransaction/login/checkuser.inc' was not found.
This is the code for default.asp.
-----------------------------------------------
<%@ LANGUAGE=3DVBScript %>
<%
Response.Buffer=3DTrue
%>
<!-- #include file=3DProductTransaction/login/checkuser.inc -->
<HTML>
<HEAD>
<META NAME=3D"GENERATOR" Content=3D"Microsoft Visual Studio 98">
<META HTTP-EQUIV=3D"Content-Type" content=3D"text/html">
<TITLE>Document Title</TITLE>
</HEAD>
<BODY>
<H1>Login Process</H1>
<P>Welcome, <%=3DSession.Contents("User")%>.
You are now logged in!</P>
<P><A href=3D"sample.asp">Visit Sample Page</A></P>
</BODY>
</HTML>
-----------------------------------------------
And this is the code for checkuser.inc.
-----------------------------------------------
<!-- SSI CheckUser Start -->
<%
'
Dim strRequest
'
' get requested page (me!)
strRequest =3D
"http://www.myweb.com/ProductTransaction/LogIn/default.asp"
strRequest =3D strRequest & Request.ServerVariables("SERVER_NAME")
strRequest =3D strRequest & Request.ServerVariables("PATH_INFO")
'
If Session.Contents("User")=3D"" Then
Session.Contents("RequestedURL")=3DstrRequest
Response.Redirect "ProductTransaction/LogIn/getuser.asp"
End If
%>
<!-- SSI CheckUser End -->
-----------------------------------------------
Do you see anything wrong?
It will be greatly appreciated if you could give me some help.
With best regards,
Hiro
Message #8 by "Drew, Ron" <RDrew@B...> on Wed, 9 Jan 2002 18:03:23 -0500
|
|
Here is how I use the includes...Under your wwwroot directory you
probably have the ProductTransaction. Under that directory create a
directory called "include" and put all your include files in it..then in
the default.asp add
<!--#Include file =3D "../include/Checkuser.inc" -->
If MS Server not case problem ...but I believe if unix it is case
sensitive
Hope it helps
-----Original Message-----
From: Hiro Shiratori [mailto:hiro-shiratori@m...]
Sent: Wednesday, January 09, 2002 5:42 PM
To: ASP Databases
Subject: [asp_databases] RE: Server-Side Include
Hello, folks, thanks for your comments and suggestions.
I've cleaned and re-created the project to start all over.
Project Name: ProductTransaction
Then I created the sub folder as LogIn.
This sub folder LogIn contains Getuser.asp, Verifyuser.asp,
Checkuser.inc, Userlist.txt, Default.asp, Sample.asp. When default.asp
is trying to open, an error occurs as follows: Active Server Pages error
'ASP 0126'
Include file not found
/ProductTransaction/LogIn/default.asp, line 6
The include file 'ProductTransaction/login/checkuser.inc' was not found.
This is the code for default.asp.
-----------------------------------------------
<%@ LANGUAGE=3DVBScript %>
<%
Response.Buffer=3DTrue
%>
<!-- #include file=3DProductTransaction/login/checkuser.inc --> <HTML>
<HEAD> <META NAME=3D"GENERATOR" Content=3D"Microsoft Visual Studio 98">
<META HTTP-EQUIV=3D"Content-Type" content=3D"text/html"> <TITLE>Document
Title</TITLE> </HEAD> <BODY> <H1>Login Process</H1> <P>Welcome,
<%=3DSession.Contents("User")%>.
You are now logged in!</P>
<P><A href=3D"sample.asp">Visit Sample Page</A></P>
</BODY>
</HTML>
-----------------------------------------------
And this is the code for checkuser.inc.
-----------------------------------------------
<!-- SSI CheckUser Start -->
<%
'
Dim strRequest
'
' get requested page (me!)
strRequest =3D
"http://www.myweb.com/ProductTransaction/LogIn/default.asp"
strRequest =3D strRequest & Request.ServerVariables("SERVER_NAME")
strRequest =3D strRequest & Request.ServerVariables("PATH_INFO")
'
If Session.Contents("User")=3D"" Then
Session.Contents("RequestedURL")=3DstrRequest
Response.Redirect "ProductTransaction/LogIn/getuser.asp"
End If
%>
<!-- SSI CheckUser End -->
-----------------------------------------------
Do you see anything wrong?
It will be greatly appreciated if you could give me some help.
With best regards,
Hiro
$subst('Email.Unsub').
Message #9 by "Hiro Shiratori" <hiro-shiratori@m...> on Thu, 10 Jan 2002 10:52:48 -0800
|
|
Ron, thank you so much!! It's now working.
I don't know why <!-- #include
file=3DProductTransaction/login/checkuser.inc --> does not work, but
surely
<!--#Include file =3D "../include/Checkuser.inc" --> works. I'll make
sure to use this method for future projects.
Once again, thank you!
Hiro
----- Original Message -----
From: "Drew, Ron" <RDrew@B...>
To: "ASP Databases" <asp_databases@p...>
Sent: Wednesday, January 09, 2002 3:03 PM
Subject: [asp_databases] RE: Server-Side Include
Here is how I use the includes...Under your wwwroot directory you
probably have the ProductTransaction. Under that directory create a
directory called "include" and put all your include files in it..then in
the default.asp add
<!--#Include file =3D "../include/Checkuser.inc" -->
If MS Server not case problem ...but I believe if unix it is case
sensitive
Hope it helps
-----Original Message-----
From: Hiro Shiratori [mailto:hiro-shiratori@m...]
Sent: Wednesday, January 09, 2002 5:42 PM
To: ASP Databases
Subject: [asp_databases] RE: Server-Side Include
Hello, folks, thanks for your comments and suggestions.
I've cleaned and re-created the project to start all over.
Project Name: ProductTransaction
Then I created the sub folder as LogIn.
This sub folder LogIn contains Getuser.asp, Verifyuser.asp,
Checkuser.inc, Userlist.txt, Default.asp, Sample.asp. When default.asp
is trying to open, an error occurs as follows: Active Server Pages error
'ASP 0126'
Include file not found
/ProductTransaction/LogIn/default.asp, line 6
The include file 'ProductTransaction/login/checkuser.inc' was not found.
This is the code for default.asp.
-----------------------------------------------
<%@ LANGUAGE=3DVBScript %>
<%
Response.Buffer=3DTrue
%>
<!-- #include file=3DProductTransaction/login/checkuser.inc --> <HTML>
<HEAD> <META NAME=3D"GENERATOR" Content=3D"Microsoft Visual Studio 98">
<META HTTP-EQUIV=3D"Content-Type" content=3D"text/html"> <TITLE>Document
Title</TITLE> </HEAD> <BODY> <H1>Login Process</H1> <P>Welcome,
<%=3DSession.Contents("User")%>.
You are now logged in!</P>
<P><A href=3D"sample.asp">Visit Sample Page</A></P>
</BODY>
</HTML>
-----------------------------------------------
And this is the code for checkuser.inc.
-----------------------------------------------
<!-- SSI CheckUser Start -->
<%
'
Dim strRequest
'
' get requested page (me!)
strRequest =3D
"http://www.myweb.com/ProductTransaction/LogIn/default.asp"
strRequest =3D strRequest & Request.ServerVariables("SERVER_NAME")
strRequest =3D strRequest & Request.ServerVariables("PATH_INFO")
'
If Session.Contents("User")=3D"" Then
Session.Contents("RequestedURL")=3DstrRequest
Response.Redirect "ProductTransaction/LogIn/getuser.asp"
End If
%>
<!-- SSI CheckUser End -->
-----------------------------------------------
Do you see anything wrong?
It will be greatly appreciated if you could give me some help.
With best regards,
Hiro
$subst('Email.Unsub').
$subst('Email.Unsub').
|
|
 |