473,545 Members | 2,627 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

General question about persistence

Or... when is a script not a script?

I have several modules for managing different aspects of our club's website,
most of which are multi-page.

Does setting such things as server.ScriptTi meout or response.buffer values
at the start of the first page persist throughout the session, or are they
"reset" with each function or sub, etc.?

TIA.

--
Neil Gould
------------------------------
Terra Tu AV - www.terratu.com
Technical Graphics & Media
Jul 21 '08 #1
22 2121
Neil Gould wrote:
Or... when is a script not a script?

I have several modules for managing different aspects of our club's
website, most of which are multi-page.

Does setting such things as server.ScriptTi meout or response.buffer
values at the start of the first page persist throughout the session,
or are they "reset" with each function or sub, etc.?
Response.Buffer applies only to the page in which it is called. And it
is not something that is affected by functions or subs running on the
page.
I think the same applies to Server.ScriptTi meout ... the docs don't say
so explicitly, but it would be easy enough to whip up a couple pages,
the first of which sets the ScriptTimeout to some large number and the
second of which checks the setting.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 21 '08 #2
Bob Barrows [MVP] wrote on 21 jul 2008 in
microsoft.publi c.inetserver.as p.general:
Response.Buffer applies only to the page in which it is called. And it
is not something that is affected by functions or subs running on the
page.
I think the same applies to Server.ScriptTi meout ... the docs don't say
so explicitly, but it would be easy enough to whip up a couple pages,
the first of which sets the ScriptTimeout to some large number and the
second of which checks the setting.
It seems to stand to logic that since:

Properties of the Response and Request objects are page wide,
properties of the Session object are session wide,
properties of the Application object are application wide,

properties of the Server object should be server wide,
so, [since ASP is the application at hand,
and not the physical server,]
in fact just application wide, too?

However I do not remember having caught MS
being completely logical in specs,
or even building exactly what their specs say,
so the test would be the taste of the pudding,
and reading the specs a mediocre second choice?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 21 '08 #3
response.buffer : Indicates whether the current page output is buffered.

server.ScriptTi meout : The ScriptTimeout property specifies the maximum amount of time any script in the application can run before
it is terminated.
Jul 21 '08 #4
Thanks Jon Paal, Bob, and Evertjan,

"Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot comwrote in message
news:MP******** *************** *******@posted. palinacquisitio n...
response.buffer : Indicates whether the current page output is buffered.

server.ScriptTi meout : The ScriptTimeout property specifies the maximum
amount
of time any script in the application can run before it is terminated.
Perhaps my experience is being affected by what the defined boundaries of a
"page" vs. "script" vs. "applicatio n" might be.

For instance, on a "page" (mix of ASP and HTML code) that selects files via
a form and calls an ASP file that processes the form but has no direct user
interaction (is that also considered a page?), I received an error that the
response buffer can't be turned off once it is turned on. Well, it was
turned on by an file included on the form processing file. So, that implies
that the boundaries of the ASP file (page?) are defined by the includes as
well. OK, makes sense.

But what about the form that called the routine? If I had set the
response.buffer off on that page, then what (not that it would make sense to
turn it off knowing that it would be turned on again, but this question is
about boundaries rather than proper coding)?

From your comment Jon, if I set the timeout on (or before) the initial page,
will it persist for all later routines and pages? If so, it would make sense
to set the value during the login procedure rather than for each of the
tasks that might be called later, but I don't know if I can trust that some
down-stream action won't time out because of being considered outside the
boundary of one of these elements.

Best,

Neil
Jul 21 '08 #5
Hi,

"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcomwrote in message
news:uv******** ******@TK2MSFTN GP04.phx.gbl...
Neil Gould wrote:
Or... when is a script not a script?

I have several modules for managing different aspects of our club's
website, most of which are multi-page.

Does setting such things as server.ScriptTi meout or response.buffer
values at the start of the first page persist throughout the session,
or are they "reset" with each function or sub, etc.?
Response.Buffer applies only to the page in which it is called. And it
is not something that is affected by functions or subs running on the
page.
I think the same applies to Server.ScriptTi meout ... the docs don't say
so explicitly, but it would be easy enough to whip up a couple pages,
the first of which sets the ScriptTimeout to some large number and the
second of which checks the setting.
Thanks for your comments!
As in my other reply, I'm trying to get a handle on how the boundaries of
these are defined, because it doesn't always work as one might expect. You
can imagine how much I love having to hack the answers to that which should
be clearly documented! ;-)

Best,

Neil

Jul 21 '08 #6
The Active Server Pages (ASP) framework provides six built-in objects:

Application
ObjectContext
Request
Response
Server
Session

Info about the scope of COM Objects in ASP Pages can be found here:

http://msdn.microsoft.com/en-us/library/ms525036.aspx

and here

http://msdn.microsoft.com/en-us/library/aa480423.aspx
Jul 21 '08 #7
Neil Gould wrote:
Thanks Jon Paal, Bob, and Evertjan,

"Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot comwrote in
message
news:MP******** *************** *******@posted. palinacquisitio n...
>response.buffe r : Indicates whether the current page output is
buffered.

server.ScriptT imeout : The ScriptTimeout property specifies the
maximum amount of time any script in the application can run before
it is terminated.
Perhaps my experience is being affected by what the defined
boundaries of a "page" vs. "script" vs. "applicatio n" might be.

For instance, on a "page" (mix of ASP and HTML code) that selects
files via a form and calls an ASP file that processes the form but
has no direct user interaction (is that also considered a page?), I
received an error that the response buffer can't be turned off once
it is turned on. Well, it was turned on by an file included on the
form processing file. So, that implies that the boundaries of the ASP
file (page?) are defined by the includes as well. OK, makes sense.
Yes, includes become part of the page/file
>
But what about the form that called the routine?
It's a different page...
I.E. the requesting form is not part of the response.
If I had set the
response.buffer off on that page, then what (not that it would make
sense to turn it off knowing that it would be turned on again, but
this question is about boundaries rather than proper coding)?
The docs are pretty clear about Buffer. The property is
Response-specific.
The boundaries for a page are from when the page is requested (and the
response begins) to when the response ends. I'm not sure what is
puzzling you about this.

A form or browser sends a request to the server, which loads the
requested page, in which the server-side code runs and sends output to
response. When complete, the response ends.
>
From your comment Jon, if I set the timeout on (or before) the
initial page, will it persist for all later routines and pages?
Despite this being a property of the Server object, I don't think so.
This is where the docs have let me down.
I'm pretty sure the scripttimeout can be set for one page without
affecting it on other pages. I believe I have done this in the past. The
default setting in the website's metadata is in effect unless a page
sets scripttimeout on that particular page..
But again ... take two minutes and try it out. Don't depend on my
memory.
Oh, never mind ... here is a simple test. Run and refresh a page
containing this code:

<%@ Language=VBScri pt %>
<%
Response.Write Server.ScriptTi meout
Server.ScriptTi meout = 100
Response.Write "<BR>"
Response.Write Server.ScriptTi meout
%>

I get 90 (the default) and 100 every time I run this page. It's pretty
clear the scope of the setting is the page.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 21 '08 #8
Hi Jon Paal,

Thanks for the pointers. Most of this is the same as in the ASP
documentation that I have. At this point, I'm chasing down a combination of
my misconceptions and anomalous results from following these structures...
it's hard to tell which is which sometimes!

"Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot comwrote in message
news:p8******** *************** *******@posted. palinacquisitio n...
The Active Server Pages (ASP) framework provides six built-in objects:

Application
ObjectContext
Request
Response
Server
Session

Info about the scope of COM Objects in ASP Pages can be found here:

http://msdn.microsoft.com/en-us/library/ms525036.aspx

and here

http://msdn.microsoft.com/en-us/library/aa480423.aspx


Jul 22 '08 #9
Hi Bob,

"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcomwrote in message
news:OZ******** ******@TK2MSFTN GP05.phx.gbl...
Neil Gould wrote:
[...]
Perhaps my experience is being affected by what the defined
boundaries of a "page" vs. "script" vs. "applicatio n" might be.

For instance, on a "page" (mix of ASP and HTML code) that selects
files via a form and calls an ASP file that processes the form but
has no direct user interaction (is that also considered a page?), I
received an error that the response buffer can't be turned off once
it is turned on. Well, it was turned on by an file included on the
form processing file. So, that implies that the boundaries of the ASP
file (page?) are defined by the includes as well. OK, makes sense.
But what about the form that called the routine?

It's a different page...
I.E. the requesting form is not part of the response.
Ah, but it *can* be part of the response, since a form's action can refer to
itself and process correctly. Does that make it "2 pages" from an ASP
perspective?
If I had set the
response.buffer off on that page, then what (not that it would make
sense to turn it off knowing that it would be turned on again, but
this question is about boundaries rather than proper coding)?

The docs are pretty clear about Buffer. The property is
Response-specific.
The boundaries for a page are from when the page is requested (and the
response begins) to when the response ends. I'm not sure what is
puzzling you about this.
What's puzzling me is the concept of a "page" where there are no contents
other than routines. The closest I can come is to consider a "page" to be
the 'P' in 'ASP'. ;-)
A form or browser sends a request to the server, which loads the
requested page, in which the server-side code runs and sends output to
response. When complete, the response ends.

From your comment Jon, if I set the timeout on (or before) the
initial page, will it persist for all later routines and pages?

Despite this being a property of the Server object, I don't think so.
This is where the docs have let me down.
I'm pretty sure the scripttimeout can be set for one page without
affecting it on other pages. I believe I have done this in the past. The
default setting in the website's metadata is in effect unless a page
sets scripttimeout on that particular page..
But again ... take two minutes and try it out. Don't depend on my
memory.
Oh, never mind ... here is a simple test. Run and refresh a page
containing this code:

<%@ Language=VBScri pt %>
<%
Response.Write Server.ScriptTi meout
Server.ScriptTi meout = 100
Response.Write "<BR>"
Response.Write Server.ScriptTi meout
%>

I get 90 (the default) and 100 every time I run this page. It's pretty
clear the scope of the setting is the page.
I agree with your conclusion, which implies that Server.ScriptTi meout (and
what other Server methods???) is not persistent. Thanks!

Best,

Neil
Jul 22 '08 #10

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

Similar topics

39
2772
by: Antoon Pardon | last post by:
I was wondering how people would feel if the cmp function and the __cmp__ method would be a bit more generalised. The problem now is that the cmp protocol has no way to indicate two objects are incomparable, they are not equal but neither is one less or greater than the other. So I thought that either cmp could return None in this case...
10
387
by: Simon Harvey | last post by:
Hi everyone, Can anyone tell me if I declare a global variable in my pages code behind, is it persisted if the page does a post back, or do I need to add the object to the session object in order to persist it. Is the session the best mechnism for persisiting this object Thanks everyone
5
1100
by: Simon Harvey | last post by:
Hi everyone, Can anyone tell me if I declare a global variable in my pages code behind, is it persisted if the page does a post back, or do I need to add the object to the session object in order to persist it. Is the session the best mechnism for persisiting this object Thanks everyone
5
2366
by: Simon Harvey | last post by:
Hi everyone, Can anyone tell me if I declare a global variable in my pages code behind, is it persisted if the page does a post back, or do I need to add the object to the session object in order to persist it. Is the session the best mechnism for persisiting this object Thanks everyone
0
7428
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7941
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7452
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7784
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5354
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3485
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3467
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1039
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
738
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.