Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Managing Session

Reply
Thread Tools

Managing Session

 
 
=?Utf-8?B?U2hhaGFyIE5lY2htYWQ=?=
Guest
Posts: n/a
 
      10-18-2006
I'm using ASP.NEt 2.0.
I use the session to save important information about the user current
session (for example the current project he is working on).
I use those variables in almost every web page in the application.
When a user session times out, I want to be able to make the user to relogin
and continue working with the application.
1. Is there easy way to catch an even just before the session times out? Or
to prelong a session (so I want lose all the variables stored there?)
2. What's the recommended way to deliver the user to the login page and than
bring him back to where he stopped using the application?

 
Reply With Quote
 
 
 
 
Hans Kesting
Guest
Posts: n/a
 
      10-18-2006
> I'm using ASP.NEt 2.0.
> I use the session to save important information about the user current
> session (for example the current project he is working on).
> I use those variables in almost every web page in the application.
> When a user session times out, I want to be able to make the user to relogin
> and continue working with the application.
> 1. Is there easy way to catch an even just before the session times out? Or
> to prelong a session (so I want lose all the variables stored there?)
> 2. What's the recommended way to deliver the user to the login page and than
> bring him back to where he stopped using the application?


You could set the session timeout to a longer period than the default
20 minutes. Note that this will keep sessions around longer for people
that "really left" the site, so your memory consumption goes up.

For people that are slowly filling in a long page and hit the session
timeout, maybe you could add an iframe that refreshes itself every 10
minutes or so. This should keep their session alive.
There is no server-side way to "extend a session" because you don't
know if that user is ever coming back.

If the user hits some page, but misses some session variables, then
either the session was lost or he got there by typing a url.
You could remember that url, have him log in and redirect "back".
BUT if he needs to have some session variables from "previous pages"
then that information is gone and you should redirect him maybe to the
first page of the set.

Hans Kesting


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Managing Multi-Application Session Environment ASP.net 2.0 gstark ASP .Net 2 04-06-2007 06:43 PM
Managing Session with javamail necleto2000@yahoo.fr Java 4 01-22-2006 10:56 PM
tomcat managing non-persistent session on pool of servers Vinc Java 0 10-21-2004 12:05 AM
A little help with managing session timeouts Simon Harvey ASP .Net 6 10-20-2004 02:55 PM
Session State - What does it take to establish one single ASP.NET session per "browser session" Jeff Smythe ASP .Net 3 01-02-2004 04:10 AM



Advertisments