473,385 Members | 1,449 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,385 software developers and data experts.

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 7146
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 FormAuthentication 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">
<system.web>
<authorization>
<allow users="?"/>
</authorization>
</system.web>
</location>

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

6
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" ...
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: 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...
4
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...
3
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...
4
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.
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...
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...
4
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....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.