Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to control state when the Session is being expired and prolong it on demand

$
0
0

This example illustrates how to create a timeout control for web sites (similar to what banks and other financial institutions have) that will display a modal popup dialog displaying the time remaining before a session is timed out and redirected to a page explaining what happened:
ASP.NET WebForms Blog Post
ASP.NET MVC Blog Post

This example contains two solutions:
The solution for v2010 vol 2.8+ versions - is an ASP.NET WebSite project.
The solution for v2011 vol 1.12+ versions - is an ASP.NET WebApplication project.

Question Comments

Added By: venkat k 4 at: 2/25/2014 10:09:04 PM    

This Code is Use full for me.
But in the user control you use Assemblies. but i didn't find Assemblies in sample
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dx" %>

<dx:ASPxPopupControl >....</dx:ASPxPopupControl >

Please Check Once This Sample.

Thanks & Regards
Venkat

Added By: Pee Jay Cadungog at: 3/24/2014 10:44:26 AM    

hi, how can i call and signout my loginstatus1 in masterpage? i tried adding something like this __doPostBack('MasterPage$LoginStatus1', '');

var updateCountDown = function() {
            var min = Math.floor(_timeLeft / 60);
            var sec = _timeLeft % 60;
            if(sec < 10)
                sec = "0" + sec;

            document.getElementById("CountDownHolder").innerHTML = min + ":" + sec;

            if(_timeLeft > 0) {
                _timeLeft--;
                _countDownTimer = window.setTimeout(updateCountDown, 1000);
            } else {
                window.location = <%=QuotedTimeOutUrl%>;
            }
        };

Added By: GHM Jansen at: 10/7/2014 5:27:00 AM    

Hi,

I'm trying to implement this (very nice) example into my application. All seemed to go well but when I was testing this control in a website I ran into a weird problem. The website has multiple pages but for now I added this control in 2 pages (for testing purposes). There is a base-page from which I open the pages with the usercontrol (no masterpage!). Oke,  I open one page and wait until the timeout message pops up. I press okay and close the page. Then, I open the second page and do the same. Again the popup is shown. I press OK after 20 seconds but I don't close the page, I just wait. After the remaining 40 seconds the application times out nevertheless and jumps to the login page, without the popup showing. Now, I added extra information to the redirect string to find out from which page the timeout is coming and I found out that it was coming from the previous opened page. It looks like that when I open the second page, the usercontrol in the first page is also executed and causes the redirect to the login page.
Is there an explanation for this and consequently, is there a solution?

Thanks,
Geert

Added By: Marion (DevExpress Support) at: 10/7/2014 6:06:03 AM    @GHM Jansen,
We will answer you in the T158466 thread (T158466: Problewm with implementing Code example E3302: How to control state when the Session is being expired and prolong it on demand).

Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>