473,698 Members | 2,611 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to extend a Session

6 New Member
I have C#.net web application which is using sessions.
When a session is going to end is it possible to show a message that the session is going to end and that do you want to continue. If the continue button is clicked the session should continue else the session can expire.
How can i do it.
Mar 30 '08 #1
1 1122
balabaster
797 Recognized Expert Contributor
I have C#.net web application which is using sessions.
When a session is going to end is it possible to show a message that the session is going to end and that do you want to continue. If the continue button is clicked the session should continue else the session can expire.
How can i do it.
Hmm, tricky one. Okay...as the page is being built check the Session.Timeout to find out how long the session lasts if no interaction is made.

Build a javascript that runs a timer for a period shorter than the session timeout and starts when the page loads... when the timer elapses, fire a confirm box. If the OK button is clicked then use window.location = http://blahblah.com to reload the page and therefore resetting the session timer back to 0.

It really is a hack to do what you want - in an ideal world when the session is about to timeout at the server end, it would notify the client - but that's not really achievable in the disconnected world of the web.
Mar 30 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
7678
by: sdhyok | last post by:
I think the two script should produce the same results, but not. Why? ---------------- Script #1 ls = ls.extend() print ls -> --------------- Script #2
10
2027
by: Jerzy Karczmarczuk | last post by:
Gurus, before I am tempted to signal this as a bug, perhaps you might convince me that it should be so. If I type l=range(4) l.extend() l gives , what else... On the other hand, try
2
1773
by: Boobie | last post by:
I switched to using this function to create element: ---------------------------------------------------- function elem(name, attrs, style, text) { var e = document.createElement(name); if (attrs) { for (key in attrs) { if (key == 'class') { e.className = attrs; } else if (key == 'id') { e.id = attrs;
4
3887
by: Yuriy | last post by:
Hi, everybody! I need every 20 min extent my Session timeout. Any suggetions appreciated! Thanks
2
1447
by: Yuriy | last post by:
Hello ! I have a problem with session variables and i need to do something with my session I need every 20 min extend my Session timeout. Any suggetions appreciated! Thanks
4
3850
by: rick | last post by:
hi Is there a DB2 equivalent of Informix.Extend function? or please help me the best way to create one Thanks rick
3
3579
by: jacobstr | last post by:
I've noticed Object.extend used in a few different ways and I'm having trouble distinguishing why certain usages apply to a given situation. On line 804 Ajax.Base is defined as follows: Ajax.Base = function() {}; Ajax.Base.prototype = { setOptions: function(options) { <...>
5
2535
by: thefox149 | last post by:
Hi All I know I can set the php.ini timeout to increase to what ever I like I also know I can do it from a php script. My question is if I can change it from the script will it extend the seesion for all users or only the user who intiated the call from the script? If not how can I set intranet users to have a time out of 1hr and internet users 15mins any help would be greatly appreciated
7
20938
by: anithaapr05 | last post by:
Hi, I am creating a session when user successfully login to the site and user gets a form to input some data into database. Assume that user entered data into some fileds and let the browser ideal and doing some other work in his/her system. My requrement is, 2 mins before(after 13 mins) of session timeout(I set session timeout as 15 mins in web.config), user should get an alert as" Your session is about to timeout in 2 mins(at...
0
8683
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9170
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9031
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8902
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7740
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4372
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2339
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.