468,753 Members | 1,177 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,753 developers. It's quick & easy.

Session.Timeout

I have a page that uses Session variables when generating the SQL statements
used to submit and retrieve data from a database. However, because I don't
know how long the user will be on the page, setting the Session.Timeout
property doesn't help me avoid errors (I can obviously set the value to a
very high value, but that still doesn't completely solve the problem). Is
there any way for me to avoid the Session timing out? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
Jul 31 '07 #1
4 2152
switch to the sql state server. you can then bump the session to days or
weeks.

-- bruce (sqlwork.com)

Nathan Sokalski wrote:
I have a page that uses Session variables when generating the SQL statements
used to submit and retrieve data from a database. However, because I don't
know how long the user will be on the page, setting the Session.Timeout
property doesn't help me avoid errors (I can obviously set the value to a
very high value, but that still doesn't completely solve the problem). Is
there any way for me to avoid the Session timing out? Thanks.
Jul 31 '07 #2
How exactly does the sql state server work? I am using SQL Server in this
case, but I have a couple questions:

1. What is the syntax for sql state server? Could you give me an example or
direct me to a page that does?

2. What if I am not using SQL Server, or what if a database is not involved
at all?

3. Even though it is not a likely scenario in the case of the site I am
working on, some people leave their browsers open for VERY long times, for
example, if a site is informational, they might keep it minimized for a long
time and occasionally look at it as a reference.

Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"bruce barker" <no****@nospam.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
switch to the sql state server. you can then bump the session to days or
weeks.

-- bruce (sqlwork.com)

Nathan Sokalski wrote:
>I have a page that uses Session variables when generating the SQL
statements used to submit and retrieve data from a database. However,
because I don't know how long the user will be on the page, setting the
Session.Timeout property doesn't help me avoid errors (I can obviously
set the value to a very high value, but that still doesn't completely
solve the problem). Is there any way for me to avoid the Session timing
out? Thanks.

Aug 1 '07 #3
re:
!How exactly does the sql state server work?

It stores session state in a SQL Server database.

re:
!Could you give me an example or direct me to a page that does?

http://msdn2.microsoft.com/en-us/library/ms178586.aspx


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Nathan Sokalski" <nj********@hotmail.comwrote in message news:ea**************@TK2MSFTNGP06.phx.gbl...
How exactly does the sql state server work? I am using SQL Server in this case, but I have a couple questions:

1. What is the syntax for sql state server? Could you give me an example or direct me to a page that does?

2. What if I am not using SQL Server, or what if a database is not involved at all?

3. Even though it is not a likely scenario in the case of the site I am working on, some people leave their browsers
open for VERY long times, for example, if a site is informational, they might keep it minimized for a long time and
occasionally look at it as a reference.

Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"bruce barker" <no****@nospam.comwrote in message news:%2****************@TK2MSFTNGP05.phx.gbl...
>switch to the sql state server. you can then bump the session to days or weeks.

-- bruce (sqlwork.com)

Nathan Sokalski wrote:
>>I have a page that uses Session variables when generating the SQL statements used to submit and retrieve data from a
database. However, because I don't know how long the user will be on the page, setting the Session.Timeout property
doesn't help me avoid errors (I can obviously set the value to a very high value, but that still doesn't completely
solve the problem). Is there any way for me to avoid the Session timing out? Thanks.


Aug 1 '07 #4
I have a page that uses Session variables when generating the SQL
statements used to submit and retrieve data from a database. However,
because I don't know how long the user will be on the page, setting
the Session.Timeout property doesn't help me avoid errors (I can
obviously set the value to a very high value, but that still doesn't
completely solve the problem). Is there any way for me to avoid the
Session timing out? Thanks.
Instead of setting the session timeout to long values, maybe you can
prevent the session from timing out, by using regular postbacks.

A session timeout of an hour means that the session variables stay
around for an hour after the user has closed his browser.

You could use a regular (once every 10 minutes is enough, as long as it is
within the regular session timeout) AJAX callback that does nothing special
except (by it's callback) refresh the session. You will need to enable
session-state for this callback however.
The user should not notice this and the session is kept open as long as
that user keeps the page open. And the session is ended reasonably
soon after he has closed his browser.

Hans Kesting
Aug 1 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by Geigho | last post: by
4 posts views Thread by DavidS | last post: by
8 posts views Thread by Joe Abou Jaoude | last post: by
11 posts views Thread by Vishal | last post: by
5 posts views Thread by Just D. | last post: by
8 posts views Thread by bdeviled | last post: by
17 posts views Thread by jensen bredal | last post: by
25 posts views Thread by =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.