Urgent:Session TimeOut

4 posts, 0 answers
  1. Pravallika
    Pravallika avatar
    30 posts
    Member since:
    Mar 2014

    Posted 08 Jul 2014 Link to this post

    Hai All,

    I am facing one problem in my website i am having one default.aspx page its not inheriting master page what i need when i open my site it will expire after 6mins for me whats happening for every pages its working fine every page is inheriting master page but this default.aspx is not inheriting master page so when i open default.aspx and doing something also its showing time out.so now i want to stop master page session time in this defult.aspx how to do.here i dont want to inherit master page and recreate bcz if i inherit master page so many issues will come so other than any solution is there plz tel me its urgent



    Thanks  
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 08 Jul 2014 in reply to Pravallika Link to this post

    Hi Pravallika,

    As a suggestion please try to set the Session Time out in the MasterPage Page_Load event. Whenever a Content Page is loading, the master page load event will fire and the all content page will have same session timeout. In the case of Default page you can extend the session time out to one large value. So the session will not clear for a long time.

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Pravallika
    Pravallika avatar
    30 posts
    Member since:
    Mar 2014

    Posted 08 Jul 2014 in reply to Shinu Link to this post

    var timoutWarning = 60000; // Display warning in 5Mins.
            var timoutNow = 120000; // Timeout in 6 mins.
            var logoutUrl = '../../Login.aspx';
            var warningTimer;
            var timeoutTimer;
     
            // Start timers.
            function StartTimers() {
                
                warningTimer = setTimeout("IdleWarning()", timoutWarning);
                timeoutTimer = setTimeout("IdleTimeout()", timoutNow);
            }
    and masterpage body load event we are starting timer so now wen i open my default page in a radwindow thru client button click of master page even wen default.aspx page is opened and iam working on it session pop up comes because on backgorund master page is opened and is idle so pop up comes... so plz help me out in implementing session pop up for my default.aspx
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 09 Jul 2014 in reply to Pravallika Link to this post

    Hi Pravallika,

    In your scenario you can change the session time out on the Default page and when closing the RadWindow try to reset the session timeout to original value. Please have a look into the sample code snippet which works fine at my end.

    Master Page:
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" OnClientClose="setSessionTime">
    </telerik:RadWindowManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
    </telerik:RadAjaxManager>
    <telerik:RadButton ID="rbtnOpenWin" runat="server" Text="Open Window" AutoPostBack="false"
        OnClientClicked="openWin">
    </telerik:RadButton>

    Master Page C#:
    protected void Page_Load(object sender, EventArgs e)
    {
        Session.Timeout = 1;
        Session["Demo"] = label1.Text;
    }
    protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
    {
        Session.Timeout = 1;
    }

    Master Page JavaScript:
    function openWin(sender, args) {
        radopen("Default.aspx", "RadWindow");
    }
    function setSessionTime(sender, args) {
        $find("<%=RadAjaxManager1.ClientID%>").ajaxRequest();
    }

    Default Page C#:
    protected void Page_Load(object sender, EventArgs e)
    {
        Session.Timeout = 40000;
    }

    Thanks,
    Shinu.
Back to Top