473,398 Members | 2,389 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,398 software developers and data experts.

Detect when the session is going to time out and display some kind of message.

UJ
How do you detect when your session is going to timeout and display a
message saying 'unless you do something you will be logged out' much the way
bank web pages do?

Can you do it for the site or do you need to put code on every page doing
it?

TIA
Nov 19 '05 #1
3 1422
UJ wrote:
How do you detect when your session is going to timeout and display a
message saying 'unless you do something you will be logged out' much the way
bank web pages do?

Can you do it for the site or do you need to put code on every page doing
it?

TIA


Nope...you could toss a timer on the page and do it yourself, but you
can't poll the session timer, without restarting it...
--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
Nov 19 '05 #2
"UJ" <fr**@nowhere.com> wrote in
news:eV**************@TK2MSFTNGP14.phx.gbl:
How do you detect when your session is going to timeout and display a
message saying 'unless you do something you will be logged out' much
the way bank web pages do?


You could put a javascript timer on the page to detect idleness.

Or if you're using SQL server as your state server, you could poll a web
service using client javascript to get a more accurate time. Just make sure
the web service is running under a different app than your ASP.NET
application, otherwise the session timer will get reset on each request.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #3
UJ
Thanks Lucas. That's what I ended up having to do.

"Lucas Tam" <RE********@rogers.com> wrote in message
news:Xn***************************@127.0.0.1...
"UJ" <fr**@nowhere.com> wrote in
news:eV**************@TK2MSFTNGP14.phx.gbl:
How do you detect when your session is going to timeout and display a
message saying 'unless you do something you will be logged out' much
the way bank web pages do?


You could put a javascript timer on the page to detect idleness.

Or if you're using SQL server as your state server, you could poll a web
service using client javascript to get a more accurate time. Just make
sure
the web service is running under a different app than your ASP.NET
application, otherwise the session timer will get reset on each request.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: HolaGoogle | last post by:
hi all, can you please tell me what i should do to avoid session timeout when displaying my database info in my asp form (DisplayUserDatabase.asp)??? ** actualy it does load and display the...
2
by: NWx | last post by:
Hi, I have the following question: I have an app that uses user login/logout to identify users When user logon, I register logon time in a session variable When user logoff using the logout...
8
by: Luke Matuszewski | last post by:
I have read all posts about how to detect that url have changed to new page and trigger the event handler then eg. function aidLogout(evt) { if(evt) { /* maybe via analyse of evt object i can...
13
by: Shailesh Humbad | last post by:
Here is an advanced PHP question. Can anyone think of a way to detect the number of bytes written to output when a script is aborted? I am sending a large file to the client, and I want to record...
2
by: Cam | last post by:
Hi to all I have searched this subject and found some posts but none of them seem to answer my problem. I am developing a shop site and need to detect when a session times out through...
30
by: Charles Law | last post by:
Here's one that should probably have the sub-heading "I'm sure I asked this once before, but ...". Two users are both looking at the same data, from a database. One user changes the data and...
18
by: sebastian | last post by:
Can this be done without client-side scripting? I thought sessions might be the answer but after some testing found that sometimes the old session data remained even after the user left the site...
7
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgRGVzYXJyb2xsbw==?= | last post by:
Hi all, misters, I have Windows App .net 2.0 + vs 2005. My form launch several MSI's (app1.msi, app2.msi). I try launch MSI using Process.Start. I need know when detect MSI executable has...
4
by: goscottie | last post by:
I used submodal as my popup window. With some tweaks, it working great in my app. However, I can't find a way to detect session timeout in the popup window. The app is a form based...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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.