session related issue

P

pintu

Hi Friends.
in my application i am facing problems in maintaining session state. I
am working on asp.net 2.0.
So i didnt checked the session on each page and almost the project is
completed. Now problem is like after 20 minutes the session gets
ended.so session related errors are coming when any operation like
insert or update is performed after that 20 minutes. how can i
redirect that page to login page after session timeout.I hav to write
code on each page or is there any other method to solve my problem...
(Though i can increase the session timeout period but i dont want
that). Waiting for ur reply.


thanks
Priyabrata
 
K

Kevin Spencer

Since the Session ends on the server side, the client can do a redirect as
long as it knows the length of the Session. One method is to use JavaScript
on the client, using the setTimeout() JavaScript method to wait for 21
minutes (or just after the length of the Session) to fire a method that
sends the browser to the login page.

--
HTH,

Kevin Spencer
Microsoft MVP

Help test our new betas,
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
 
C

Cowboy \(Gregory A. Beamer\)

You can set up a Javascript bit to force the person to the login at that
time you estimate the timeout has occurred, although timeout is server side
and you cannot truly tell. If you do this, make sure you abandon session in
case you arrived early.

I do this in the master page, so it is on every form and programatically
avoid doing it on the login page.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*********************************************
Think outside the box!
*********************************************
 

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

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top