transparent redirection in asp

A

Anthony Jones

Bob Barrows said:
No, it doesn't - my mind is now boggled. What have I ever said that
would imply, err .... that a page is equivalent to an application?


I don't see why. Many people use the term "page" when they are talking
about a file to be requested from a web server. In your browser's
address bar, you are seeing the address of a page (file) that you are
requesting the web server to serve. If the requested page is mapped to
be processed by the asp.dll. I don't know how you make the leap to say
an "application itself appears in the address bar, e.g. "Members.asp"."

I think the issue is that we have a both a physical and a logical
definition of many of these terms.
The physical definition of a page is a file. It contains code and text.
It can either be served directly via http as html, or processed by
asp.dll to generate html.
The logical definition consists of everything that happens between the
time the physical page is requested and the response ends.
Yes, it is confusing that we use the same term for both concepts but
this is not the only place we do so.

In physical terms, an ASP application consists of all the files (pages)
in a virtual directory, including subfolders.
In logical terms, an ASP application "comes to life", i.e., the
Application object is created, the first time one of the files in the
_physical application_ is requested. If an application_onstart event
handler is present in the global.asa, it will be processed at this time.
The "logical" application stays alive until a change is made to the
global.asa file or the server is reset.


Now you've got me going back over what I've previously said that could
possibly lead one to the conclusion that a function could contain a
page. Are you talking about a vbscript function? If so, a function is
contained in a physical page, not vice versa.

Hmm, I think I understand what you are trying to say. You have a
physical page containing several functions, each of which generates
different html to be sent to the client. And you are thinking a
different "page" is being sent to the client depending on which function
is run, so you are thinking that each function contains a different
page? Whereas I would be thinking that the same page is being processed
regardless of which function is run, the only difference being what html
is sent to the client.

and here I was thinking F# is hard it seems defining what a page is harder
;)

Page: "The resultant rendering of HTML" thats the best I can do.

Active Server "Page" is a misnomer IMO. I think I've stated somewhere
before that I suspect it would have been Active Server File if ASF hadn't
already been in use and Active Server Script (which is what it really is)
just won't do.
 
B

Bob Barrows [MVP]

Anthony said:
Page: "The resultant rendering of HTML" thats the best I can do.

Active Server "Page" is a misnomer IMO. I think I've stated somewhere
before that I suspect it would have been Active Server File if ASF
hadn't already been in use and Active Server Script (which is what it
really is) just won't do.
That's hard to argue with except that another name for "page" scope is
needed.
 
B

Bob Barrows [MVP]

Anthony said:
Page: "The resultant rendering of HTML" thats the best I can do.

That seems to be a definition from a user's POV. And even then, it's a
little dodgy. Does the fact that different text is displayed in a
browser window make it a different page? Even when the url used to
request it is the same? Yeah, I guess from a user's POV the answer could
be "yes".

From this developer's POV, the page is the file used to generate the
html.
 
N

Neil Gould

Evertjan. said:
Neil Gould wrote on 05 aug 2008 in
microsoft.public.inetserver.asp.general:


"Application" in ASPese roughly is all the sessions together since the
last sever reset.
In ASPese, I'm only familiar with "Application" as an object with the
properties, collections, methods and events that best fit what I was trying
to describe, and have nothing to do with the server being reset. So, it's
entirely possible that I misunderstand the structure in the way that you
describe, but then again, I'm here only to learn such things.
That is not an applicaton, but just a page.
Well, that brings me back to earlier conversations here regarding what the
boundaries of a "page" might be in ASP. What you are calling a "page" here
is almost the antithesis of what Bob and others have called a "page", and
would not qualify as a "page" by the definitions they presented for several
reasons.
Activities controlled by that
application do not change the URL presented to the browser regardless
of the actual location of the page being rendered, which is how I
understood the OQ.

How can activities [What is "activities" anyway?]
be controlled by a page?
What I mean by "activities" is the users' interaction with the site, such as
viewing content, uploading/downloading files, etc. If there is a more
appropriate term, please advise.
I thought I was explaining the problems of frames in html?

Include files just enter text in the bytesteam that will be
interpreted by the ASP-interpreter, and as such are just part of that
stream,
and only handy if part of multiple pages are the same again and again.


A function does not contain a page.
Your definition of a "page" differs from both the HTML definition and Bob
and others' definition of ASP pages, so I have no idea what you mean by this
comment. But, since I specifically said "HTML pages", those are defined by
HTML structures (head, body, table, etc.) and they most certainly can be
"contained" in VB/JScript functions.
A bot does not render, it indexes page content by URL.
A bot has no screen, it just parses the incoming stream,
while skipping script and tag content.
URL's cannot be rendered, as an URL is just a text string.
How can a bot _determine_ the URL under those circumstances?
We were talking cloacking with a frameset with a single frame!


===================

ASP can make many different rendered pages all having a single
pagename, depending on:

received form-post values,
received querystring
a session variable value
an application variable value
a date or time of day
etc
etc

A simple example in VBS, not tested:

========= NowAgoToCome.asp =============
<%
toDay = now
if toDay > #2008/08/09# then
server.transfer "inTheFuture.asp"
if toDay < #2008/08/01# then
server.transfer "inThePast.asp"
else
server.transfer "nearlyInThePresent.asp"
end if
response.write "This is never written"
%>
================================
We aren't talking about the same thing. I'm referring to usage such as:
========================================
<%
FUNCTION MainPage
%>
<head>
<title>Welcome <%=Session.Contents.Item("WhoIs")%></title>
</head>
<frameset rows="155,*" border="0" framespacing="0" frameborder="no">
<frame src=<%=HeaderPage%> name="Header" noresize scrolling="no">
<frame src=<%=BodyPage%> name="Pages" noresize>
</frameset>
<noframes>
</body>
</noframes>
</html>
<%
END FUNCTION
%>

========================================

Where "HeaderPage" and "BodyPage" are two other functions in an include file
containing HTML code, just as does this function. In such a case, AFAICT,
the only thing visible is something like whatever.com/members.asp,
regardless of the location of the content or "activity" being accessed by
the user. I thought this might be what the OQ was referring to.

So, I was curious about how a bot might extract than this without accessing
the ASP code?

Neil
 
E

Evertjan.

Neil Gould wrote on 06 aug 2008 in
microsoft.public.inetserver.asp.general:
I just want to better understand what is and is not loaded at any
point in time. If the form that initializes an upload process calls an
ASP file/page that controls the process, and that ASP file/page
includes the actual code in a separate file (yes, I understand about
includes to that point), when the completion of that process calls
another ASP file/page, I presume that the previous file/page/include
is completely unloaded. Yet, the "application" -- "Members.asp" -- is
still the only thing indicated in the address bar, and looking at
"properties" at any stage does not indicate anything more than that
(which is why I was curious about the ability of bots to get beyond
that without reading the ASP code).

You are still not grasping what an application is.

It is the complete us of a website [well sort of]
by all the active users together, which could be thousands.

Any application-object-value is shared by all these users
and could be accessed by asp on each page any user requests.

The application and the aplication-object does not belong to a file/page,
so "Members.asp" is NOT an application.

Each user has a session and a session-object,
that only can be maintained by recognizing the user wit the session-id
cookie. Otherwize each page will be a new session.

You could define the application as a logical collection of all sessions,
though not a collection in the object sense, as the sessions have no access
to eachother's objects but though the application object, [or through a
database or datafile]
 
E

Evertjan.

Neil Gould wrote on 06 aug 2008 in
microsoft.public.inetserver.asp.general:
In my haste to present an example, I erred. The actual code uses this
form: <frame src=<%=Session.Contents.Item("MemberHdr")%> name="Header"
noresize

Where the session variable is the name of the VBScript function.

That could be, but the function is never executed and the function name
is given to the src of the frame to be used as a url string clientside.

You would have to use evil Eval() like:

I
wanted to make it clearer that a function was being called, not a
particular ASP file, and instead may have confused you. Sorry!

There is no such rendered string, AFAICT, as "myPage27.asp" (or any
other individual and independent ASP file containing the HTML to be
rendered) doesn't exist. I'd understand your perspective if such files
were being called, but they aren't.

Nonsense.

Then the frame cannot display it's content as it has none.

A frame only can be used to display content
if it has a valid url string in its src='...',

[or after the src is later applied by clientside code,
or the content is later written into it by clientside code]

You are in error.

Serverside functions do not "function" clientside.
 
N

Neil Gould

Bob said:
Right, but those objects, etc only persist until the Application is
reset, either via the server being reset or by a change in global.asa.
For example, all application variables need to be repopulated when the
server is reset.
I agree with this. However, that defines applications as an entity
independent of server resets. Just because the variables are repopulated
does not alter their pupose, does it? As I understand it, the application is
not initialized until it is accessed by a user. Is that wrong, even in cases
where there is no global.asa?
No, it doesn't - my mind is now boggled. What have I ever said that
would imply, err .... that a page is equivalent to an application?
You didn't, and I wasn't suggesting that you did. But, you did say what you
say again later in this message: "Many people use the term "page" when they
are talking about a file to be requested from a web server." This equates
the boundaries of a "page" to that of a file, and others have suggested that
once that file is processed by the server, the "page" has terminated, as
opposed to all of the files that may be handled by what I called the
"application".
I don't see why. Many people use the term "page" when they are talking
about a file to be requested from a web server. In your browser's
address bar, you are seeing the address of a page (file) that you are
requesting the web server to serve. If the requested page is mapped to
be processed by the asp.dll. I don't know how you make the leap to say
an "application itself appears in the address bar, e.g.
"Members.asp"."
Hey, I'm the first to admit that I do not grasp such a nebulous notion when
a single session can encompass hundreds of "files", yet still be under the
control of a single whatever-you-want-to-call-it (in this case
"Members.asp").
I think the issue is that we have a both a physical and a logical
definition of many of these terms.
The physical definition of a page is a file. It contains code and
text. It can either be served directly via http as html, or processed
by asp.dll to generate html.
The logical definition consists of everything that happens between the
time the physical page is requested and the response ends.
Yes, it is confusing that we use the same term for both concepts but
this is not the only place we do so.
;-)

In physical terms, an ASP application consists of all the files
(pages) in a virtual directory, including subfolders.
That is how I understood it, and tried to use the term. So, when I said that
there are "3 applications", I was referring to 3 (actually more) virtual
directories with subfolders. The first application is the login, that then
determines through redirection which application the user will engage.
In logical terms, an ASP application "comes to life", i.e., the
Application object is created, the first time one of the files in the
_physical application_ is requested.
Again, that is consistent with how I used the term "application". The user
initializes (brings to life) the application by requesting specific files at
login.
If an application_onstart event
handler is present in the global.asa, it will be processed at this
time. The "logical" application stays alive until a change is made to
the global.asa file or the server is reset.


Now you've got me going back over what I've previously said that could
possibly lead one to the conclusion that a function could contain a
page. Are you talking about a vbscript function? If so, a function is
contained in a physical page, not vice versa.
Yes, I was referring to a vb/jscript function, but I was referring to an
HTML 'page' as defined by HTML parameters (head, body, etc.).
Hmm, I think I understand what you are trying to say. You have a
physical page containing several functions, each of which generates
different html to be sent to the client. And you are thinking a
different "page" is being sent to the client depending on which
function is run, so you are thinking that each function contains a
different page? Whereas I would be thinking that the same page is
being processed regardless of which function is run, the only
difference being what html is sent to the client.
I can understand that perspective, but then the issue becomes the files
associated with the "application" being separate "pages", as you suggest.
For example, if one file provides the user with code to upload a file, it is
an ASP "page", even in that single activity we can be talking about a number
of different ASP files. Are they separate pages in ASPese? Would they have
unique URLs?

I just want to better understand what is and is not loaded at any point in
time. If the form that initializes an upload process calls an ASP file/page
that controls the process, and that ASP file/page includes the actual code
in a separate file (yes, I understand about includes to that point), when
the completion of that process calls another ASP file/page, I presume that
the previous file/page/include is completely unloaded. Yet, the
"application" -- "Members.asp" -- is still the only thing indicated in the
address bar, and looking at "properties" at any stage does not indicate
anything more than that (which is why I was curious about the ability of
bots to get beyond that without reading the ASP code).

Neil
 
N

Neil Gould

Evertjan. said:
Neil Gould wrote on 06 aug 2008 in
microsoft.public.inetserver.asp.general:
[...]
Your definition of a "page" differs from both the HTML definition and
Bob and others' definition of ASP pages, so I have no idea what you
mean by this comment. But, since I specifically said "HTML pages",
those are defined by HTML structures (head, body, table, etc.) and
they most certainly can be "contained" in VB/JScript functions.

You miss the point.

A function in asp is a scripting construct.
I was using it as such, specifically via VB/JScript.
Simple, it reeds that UPRL in the stream of another page, for
instance a frames page.
I was trying to demonstrate that no such content is required, and that a
VB/JScript function name is not a URL.
No, they are not include files, but clientside URL's of the frames.
They are easily readable in the frames page by a bot.
Yes, they are functions in an #include ASP file, and they have no direct
references to a URL to be read by a bot. The references are only to function
names and/or session variables. So, what is the bot going to report?
An include file in asp, being a serverside command, goes:
<!--#include file ="/aFile.asp"-->
Which is exactly how the file I am referring to is included. FWIW, the file
contains only functions with HTML page codes.
Simple, the bot does not read:

<frame src='<%=BodyPage%>' name="Pages" noresize>
In my haste to present an example, I erred. The actual code uses this form:
<frame src=<%=Session.Contents.Item("MemberHdr")%> name="Header" noresize

Where the session variable is the name of the VBScript function. I wanted to
make it clearer that a function was being called, not a particular ASP file,
and instead may have confused you. Sorry!
as that does not leave the server, but the rendered string:

<frame src='/pages/myPage27.asp' name="Pages" noresize>
There is no such rendered string, AFAICT, as "myPage27.asp" (or any other
individual and independent ASP file containing the HTML to be rendered)
doesn't exist. I'd understand your perspective if such files were being
called, but they aren't.

Best,

Neil
 
N

Neil Gould

Evertjan. said:
Neil Gould wrote on 06 aug 2008 in
microsoft.public.inetserver.asp.general:


That could be, but the function is never executed and the function
name is given to the src of the frame to be used as a url string
clientside.
The above frame src (one section of a frame that is itself contained in a
function) is executed via a call to that function.
You would have to use evil Eval() like:

src = '<% = Eval(Session.Contents.Item("MemberHdr")) %>'
No, that isn't what is being used in this case. It is as I described.

Nonsense.

Then the frame cannot display it's content as it has none.

A frame only can be used to display content
if it has a valid url string in its src='...',
As pointed out above, the target of the src= is a session variable that
contains the name of a VBScript function in an #include file, so the URL is
the original file ("members.asp" in the example). That URL does not change,
regardless of the number of individual ASP files that supply content to that
VBScript function/HTML page or any of the dozens of others in that #include
file.

Neil
 
N

Neil Gould

Evertjan. said:
Neil Gould wrote on 06 aug 2008 in
microsoft.public.inetserver.asp.general:
I just want to better understand what is and is not loaded at any
point in time. If the form that initializes an upload process calls
an ASP file/page that controls the process, and that ASP file/page
includes the actual code in a separate file (yes, I understand about
includes to that point), when the completion of that process calls
another ASP file/page, I presume that the previous file/page/include
is completely unloaded. Yet, the "application" -- "Members.asp" -- is
still the only thing indicated in the address bar, and looking at
"properties" at any stage does not indicate anything more than that
(which is why I was curious about the ability of bots to get beyond
that without reading the ASP code).

You are still not grasping what an application is.

It is the complete us of a website [well sort of]
by all the active users together, which could be thousands.

Any application-object-value is shared by all these users
and could be accessed by asp on each page any user requests.

The application and the aplication-object does not belong to a
file/page, so "Members.asp" is NOT an application.
Even though "Members.asp" meets all of the above criteria? In other words,
"membrs.asp" is the "complete us(e) of a website... by all the active..."
MEMBER "users together". That differentiates the use of the site from
administrative and non-member users, other "applications" that meet those
same criteria. What am I not grasping?

Neil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,078
Messages
2,570,572
Members
47,204
Latest member
MalorieSte

Latest Threads

Top