473,399 Members | 2,278 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

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 2311
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Geigho | last post by:
Setting session timeout in web.config file does not seem to have any effect. Any explanation or suggestion will be appreciated.
4
by: DavidS | last post by:
First: There are several ways to confuse one regarding session timeout. (1) web.config - <sessionState timeout="20"> (2) IIS Manager | Internet Information Services | ServerNode | Default Web Site...
8
by: Joe Abou Jaoude | last post by:
hi, I have a web app with forms authentication and a timeout session of 20 mins for security reasons. I recently added a feature that allows users (if they want to) to automatically log in...
11
by: Vishal | last post by:
Hello, can anybody tell me how I can extend the session expiry time? Is it done via code or via IIS? Sorry I am new and dont know about this.
5
by: Just D. | last post by:
Do we have any access to the Session object from a different Session? The idea is to save Session of a current user and then if he logs in again then return the Session back. It's not a problem to...
8
by: bdeviled | last post by:
I am deploying to a web environment that uses load balancing and to insure that sessions persist across servers, the environment uses SQL to manage sessions. The machine.config file determines how...
17
by: jensen bredal | last post by:
Hello, i'm struggling with a somehow badly understood session scenario. I provide acces to my pages based on form authentication using Session cookies. Som of my pages are supposed to be...
4
by: UJ | last post by:
I have a page where the user can upload a video file. As you can guess, this may take a while. Is there a way I can change the session timeout for just this one page? I would also want to change...
25
by: =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= | last post by:
I tried: <sessionState timeout="1"> </sessionState> bounced IIS, and after 1 minute still had a session. ??? -- thanks - dave
6
by: ChrisAtWokingham | last post by:
I have been struggling with unexpected error messages on an ASP.NET system, using SQL and C#. The application draws organisation charts, based on data stored in the SQL database. Some of the chart...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...

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.