Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Re: asp_databases digest: May 17, 2000


Message #1 by "Jim Joy Chundevalel" <topgunjim@z...> on Fri, 19 May 2000 09:03:36 +0000
For setting the script time out.. use the

Server.ScriptTimeOut = <number> in seconds



Response.Expires / Response.ExpiresAbsolute is used to expire a page

from the users cache..



Hope this solves your doubts



I have a question - how good is it use a connection object as a Session

Variable so that as soon as a user starts a session with my application,

a connection is opened in the Session_OnStart event and when the session

ends, the connection is closed in the Session_OnEnd event ? I want to

know whether opening a connection at the start of every page using a

server side include) is better or this ..



Thanks in Advance..

Jim

Jim

> 

> Subject: Re: asp page expires

> From: mkrishna - Internet Mail 

> Date: Wed, 17 May 2000 12:10:16 -0400

> X-Message-Number: 1

> 

> As regards the setting in PWS... I have no idea

> 

> hey! U can set the timout period of every page by this line on top

> of every

> page

> 

> <%response.expires  (number) %>

> 

> this number could be any integer value. If its 0 then the page timesout

> immediately... if its 5 it times out after 5 seconds. 

> 

> I hope this helps....

> 

> good luck!!!

> 

> > -----Original Message-----

> > From:	Andrew Smith 

> > Sent:	Tuesday, May 16, 2000 1:33 PM

> > To:	ASP Databases

> > Subject:	[asp_databases] Re: asp page expires

> > 

> > This is exactly the problem thanks for help.

> > 

> > I am currently developing this web on win95 with pws (not thru choice)

> -

> > is

> > there anyway to set script timeout in pws settings?

> > 

> > regards

> > 

> > Andy

> > ----- Original Message -----

> > From: Shawn Steward 

> > To: ASP Databases <asp_databases@p...>

> > Sent: Tuesday, May 16, 2000 5:00 PM

> > Subject: [asp_databases] Re: asp page expires

> > 

> > 

> > > The asp page is timing out because your script timeout is set to

> about 1

> > > minute.  The default is usually 90 seconds.  You can change this

> in IIS

> > for

> > > that web.  You need to go into the Application configuration settings,

> > on

> > > the App Options tab you can set the ASP Script timeout to 360 seconds

> or

> > > something like that...

> > >

> > > As for the progress report, you can turn buffering on at the top

> of your

> > > page, like this:<% Response.Buffer = True %>.

> > >

> > > Then throughout your page, when you want to display what's been

> > processed,

> > > you can use <% Response.Flush %>.  You'll probably want to use

> a

> > > Response.Write with some information about your procedure right

> before

> > the

> > > Response.Flush so you can see something on the screen to let you

> know

> > where

> > > it's at.

> > >

> > > hope this helps!

> > >

> > > shawn

> > >

> > > On 05/16/00, ""andy" wrote:

> > > > Hello

> > >

> > > I have an asp page which calls a vb dll to run a

> > > process in sqlserver which will take aprox 4-5 mins to run.

> > >

> > > The vb process runs ok but the asp page expires about 1 min

> > > into the process. Why would this happen?

> > >

> > > Secondly is there a way to report progress on the job back to the

> > > asp page ?

> > >

> > > Any help would be appreciated.

> > >

> > > Andy

Message #2 by "William Milne" <wmilne01@e...> on Fri, 19 May 2000 13:46:25
Jim



My advice to you learnt from bitter experience is do not store connection 

or recordset objects in Session space. Quite apart from the scaleability 

implications, it can have horrendous and unpredictable consequences on your 

application. I have a page which kept falling over about 30-40% of the time 

when you tried to open it because of this. The error message was 

misleading. After a long and problematic support case with Microsoft 

support, they strongly advised me to remove all connection and recordset 

objects from session space, not only on my web but on the whole web server, 

as  other 'innocent' virtual webs were being affected. Anyway, thanks to 

connection pooling there is no benefit from storing connections as Session 

variables. Here is a quote from one of their replies:



As we discussed storing objects in session can certainly lead to problems

(serialization, memory/resource problems, etc).  Moreover, it is not good 

to

store connection objects in session since it would defeat connection 

pooling

http://support.microsoft.com/support/kb/articles/q176/0/56.asp and 

possibly

lead to a variety of difficult to isolate problems.



Hope this helps



Willie



On 05/19/00, ""Jim Joy Chundevalel" <topgunjim@z...>" wrote:

I have a question - how good is it use a connection object as a Session

Variable so that as soon as a user starts a session with my application,

a connection is opened in the Session_OnStart event and when the session

ends, the connection is closed in the Session_OnEnd event ? I want to

know whether opening a connection at the start of every page using a

server side include) is better or this ..



Thanks in Advance..

Jim

Jim

> 

> Subject: Re: asp page expires

> From: mkrishna - Internet Mail 

> Date: Wed, 17 May 2000 12:10:16 -0400

> X-Message-Number: 1

> 

> As regards the setting in PWS... I have no idea

> 

> hey! U can set the timout period of every page by this line on top

> of every

> page

> 

> <%response.expires  (number) %>

> 

> this number could be any integer value. If its 0 then the page timesout

> immediately... if its 5 it times out after 5 seconds. 

> 

> I hope this helps....

> 

> good luck!!!

> 

> > -----Original Message-----

> > From:	Andrew Smith 

> > Sent:	Tuesday, May 16, 2000 1:33 PM

> > To:	ASP Databases

> > Subject:	[asp_databases] Re: asp page expires

> > 

> > This is exactly the problem thanks for help.

> > 

> > I am currently developing this web on win95 with pws (not thru choice)

> -

> > is

> > there anyway to set script timeout in pws settings?

> > 

> > regards

> > 

> > Andy

> > ----- Original Message -----

> > From: Shawn Steward 

> > To: ASP Databases <asp_databases@p...>

> > Sent: Tuesday, May 16, 2000 5:00 PM

> > Subject: [asp_databases] Re: asp page expires

> > 

> > 

> > > The asp page is timing out because your script timeout is set to

> about 1

> > > minute.  The default is usually 90 seconds.  You can change this

> in IIS

> > for

> > > that web.  You need to go into the Application configuration settings,

> > on

> > > the App Options tab you can set the ASP Script timeout to 360 seconds

> or

> > > something like that...

> > >

> > > As for the progress report, you can turn buffering on at the top

> of your

> > > page, like this:<% Response.Buffer = True %>.

> > >

> > > Then throughout your page, when you want to display what's been

> > processed,

> > > you can use <% Response.Flush %>.  You'll probably want to use

> a

> > > Response.Write with some information about your procedure right

> before

> > the

> > > Response.Flush so you can see something on the screen to let you

> know

> > where

> > > it's at.

> > >

> > > hope this helps!

> > >

> > > shawn

> > >

> > > On 05/16/00, ""andy" wrote:

> > > > Hello

> > >

> > > I have an asp page which calls a vb dll to run a

> > > process in sqlserver which will take aprox 4-5 mins to run.

> > >

> > > The vb process runs ok but the asp page expires about 1 min

> > > into the process. Why would this happen?

> > >

> > > Secondly is there a way to report progress on the job back to the

> > > asp page ?

> > >

> > > Any help would be appreciated.

> > >

> > > Andy

Message #3 by "Ken Schaefer" <ken.s@a...> on Fri, 19 May 2000 23:39:25 +1000
> I have a question - how good is it use a connection object as a Session

> Variable so that as soon as a user starts a session with my application,

> a connection is opened in the Session_OnStart event and when the session

> ends, the connection is closed in the Session_OnEnd event ? I want to

> know whether opening a connection at the start of every page using a

> server side include) is better or this ..



This is one of the biggest no-nos around - you are serialising the user's

connections through the one connection object - and your scalability goes in

a heap. Further, if you have lots of users, you are starting to create lots

of connections (until you reach the limit that can be sustained by your

server) which hang around until the user's session times out - and new users

will be left looking at pages where connections can't be created.



Create and destroy the objects on each page - with connection pooling this

will be faster than creating session level objects.



You could store the connection string in an application level variable if

you want - so as to make it available to all users...



Cheers

Ken




  Return to Index