Session help

P

Paul M

Hi
I have done a search on extending session timeout and come across this
script
<% Session.Timeout = 35 %> 'this will make it 35 minutes

Do i just put it at the top of the page that the sessions will be created
in?

I have another question
The person logs in and a session is created.That person might veiw several
pages before accesing the page that requires the session which might have
a lengthy form in it . Is it true that the session might be nearly timed out
when they access this page. If so can a session time be made to start again
when a page is accessed
Thanks
Paul M
 
T

Thomas A. Rowe

You can place the code at the top of any .asp page where you want to extent the session timeout. As
long as the person is moving between .asp pages within the same web the session will never timeout,
it is only if they site on a page for longer then the timeout value or leave the site that the
session will timeout. The session will close when they close there browser.

If you going to set

<% Session.Timeout = 35 %>

when they start the form, then you should set it back to 20 minutes after they have submitted the
form

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
S

Stefan B Rusynko

PS
You may want to check w/ your host first
- some "block" any Session timeout changes unless they are made at the server level and the site is running in high isolation mode
(again set by them)




| You can place the code at the top of any .asp page where you want to extent the session timeout. As
| long as the person is moving between .asp pages within the same web the session will never timeout,
| it is only if they site on a page for longer then the timeout value or leave the site that the
| session will timeout. The session will close when they close there browser.
|
| If you going to set
|
| <% Session.Timeout = 35 %>
|
| when they start the form, then you should set it back to 20 minutes after they have submitted the
| form
|
| --
| ==============================================
| Thomas A. Rowe (Microsoft MVP - FrontPage)
| ==============================================
| If you feel your current issue is a results of installing
| a Service Pack or security update, please contact
| Microsoft Product Support Services:
| http://support.microsoft.com
| If the problem can be shown to have been caused by a
| security update, then there is usually no charge for the call.
| ==============================================
|
| > Hi
| > I have done a search on extending session timeout and come across this script
| > <% Session.Timeout = 35 %> 'this will make it 35 minutes
| >
| > Do i just put it at the top of the page that the sessions will be created in?
| >
| > I have another question
| > The person logs in and a session is created.That person might veiw several pages before accesing
| > the page that requires the session which might have a lengthy form in it . Is it true that the
| > session might be nearly timed out when they access this page. If so can a session time be made to
| > start again when a page is accessed
| > Thanks
| > Paul M
| >
|
|
 
P

Paul M

Thanks
How do sessions work ,I understand the basics. A variable is stored on the
server as a session but if I have a session called "name" how can lots of
people save a session called name,what makes there session unique to them
so they dont get someone elses session "name"
Thanks
Paul M
 
T

Thomas A. Rowe

See:
http://www.asp101.com/resources/apps_sessions_gasa.asp

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
K

Kevin Spencer

Hi Paul,

Actually, its not a variable. It's a Collection of Collections. The
Application object houses the Collection of Session objects, each of which
is a Collection of data owned by a single client Session.

The way that the ASP or ASP.Net app keeps track of it is with a Session
cookie sent to the client. A Session cookie is not like the type of cookie
you may know about. It is not stored on the client hard drive, but in the
browser's memory. It contains only a single Session ID, the Session ID that
is in the Sessions Collection in the Application on the host server. So,
when the browser sends a request, all cookies are sent with it as headers
(as usual), including the Session cookie. The Application then fetches the
Session Collection with that Session ID for use during that Request.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.
 

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

Top