Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / August 2007

Tip: Looking for answers? Try searching our database.

Session.Timeout

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nathan Sokalski - 31 Jul 2007 23:50 GMT
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.
Signature

Nathan Sokalski
njsokalski@hotmail.com
http://www.nathansokalski.com/

bruce barker - 01 Aug 2007 00:03 GMT
switch to the sql state server. you can then bump the session to days or
weeks.

-- bruce (sqlwork.com)

> 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 - 01 Aug 2007 01:27 GMT
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.
Signature

Nathan Sokalski
njsokalski@hotmail.com
http://www.nathansokalski.com/

> switch to the sql state server. you can then bump the session to days or
> weeks.
[quoted text clipped - 8 lines]
>> solve the problem). Is there any way for me to avoid the Session timing
>> out? Thanks.
Juan T. Llibre - 01 Aug 2007 02:13 GMT
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/
======================================
> How exactly does the sql state server work? I am using SQL Server in this case, but I have a couple questions:
>
[quoted text clipped - 15 lines]
>>> 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.
Hans Kesting - 01 Aug 2007 08:39 GMT
> I have a page that uses Session variables when generating the SQL
> statements used to submit and retrieve data from a database. However,
[quoted text clipped - 3 lines]
> 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 Kestin

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.