473,888 Members | 2,194 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

detect session timeout in popup

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 authentication
so the default.aspx page will show up in the popup.

So I'm looking into several options.

1. detect session timeout in javascript so that I prevent the popup
from even happening. I can simply redirect or post to itself so that
the calling page will redirect to login (default) page.
2. detect session timeout in popup (in javascript also) so that it can
self terminate. I can make the calling page redirect to default page
once I detect the timeout.
3. in popup window (aspx page), detect session timeout and self close
or at least display nice message with a link to login again (popup
remains open).

I guess I would rather find a solution in the client side than server
side. Any solution will work for me.

Any help appreciated.
Oct 23 '08 #1
4 7187
Its hard to guess at what you're doing because you aren't saying much
about how your application works and how the credentials were
originally obtained (ie if its forms based, do you have a seperate
login screen? is the login integrated with other screens?, etc)

If this popup is important, I'ld get your system to prompt the user
for credentials when the timeout is detected at the time your popup
tries to access its contents. I'm assuming your popup is showing a
different webpage than the IE window is that called it.

To ensure that a new copy of the popups webpage is always retrieved
from the server (instead of from the browser's cache), I'ld set a
metatag in the popup's page that tells IE to always fetch a new page.
This way you can be sure there's a timeout problem.

I don't know if this helps
Oct 23 '08 #2
Thanks for replying. And let me clarify few things.

It is a Form authenticated site using Membership provider. The
calling page is protected for only authenticated users. A popup will
show up upon a lick on a link to show search criteria, which is in
fact different page in aspx. So if it expires then it can simply
either close or ask to close and relogin. That says that the popup is
not important. I just don't it to display default login page. I
think I mentioned session but after further reading it is a Form
authentication. So I was wrong there.
Oct 23 '08 #3
I wonder if I can intercept FormAuthenticat ion failure event and
redirect to another page instead of login page. Of course, just from
that popup window page.
Oct 23 '08 #4
I got around.

My simply adding

<location path="Content/Popup.html">
<authorizatio n>
<allow users="?"/>

to web.config, this will not authenticate the popup message thus
bypasses login page display within popup window. As soon as user
returns to the calling page, it times out and redirects to the login
page. This is ok for me, as I stated, because the popup is not
important to be authenticated.
Oct 23 '08 #5

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

Similar topics

by: Nedu N | last post by:
Hi, I am trying to design a Home page for my applicatiion in which i want show the links for for some itms... I tried to put the following <td> <font face="Arial, Helvetica, sans-serif" color="#ffffff" size="2"> Contact | My Profile | Logout /font> </td>
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 link, I also register logoff time and update accordingly the logging history table. However user can simply close the browser without logoff, so his session was closed.
by: Amith Singh | last post by:
When the sessions times out I would like to take the user to the login page. Currently even though session times out user will come to know only when he clicks on the screen. How to direct the user automatically to login page once the session times out. I am using .Net Framework 1.1. and IIS 5 Amith
by: Lars Netzel | last post by:
Hello! In Global.asax I've seen an event called Session TIme out... I tried Putting a Response.Write("<script language=""javascript"">alert('Timeout');</script>") in there to give a popup when the session times out but it didn't work, didn't get any errors either... can this be done and how? Merry Christmas! /Lars
by: kurt | last post by:
Hi All. I have a page that users enter information in text boxes...and sometimes it's a lot of information. There are times that these folks either take their time entering the info or do other things before they submit the page. Unfortunately, if they do take their time, there are times where the session times out and they can no longer submit their information, resulting in an error and pretty peeved users. What I'm asking for help on...
by: John Blair | last post by:
Hi, I would like my page_load event to detect if a session has timed out..is this possible? Thanks.
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 detect the close of the browser window */ } if(window.event) { /* maybe via analyse of window.event object i can detect the close of the browser window */
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 inactivity and tell the user that it has been reset and he has to start over. I set some session variables in a global.asa file so when the user restarts
by: Dst | last post by:
This is what i'm trying to do: I'm porting a windows app to a web app. I have a webform which will edit some data stored in a database. The data needs to be locked in the database, while editing. On first page load: Create a custom rowlock object and store it in viewstate. When user clicks on edit, retrieve the viewstate object and lock the row in the database.
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...
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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...
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,...
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...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
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...
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
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.