Session Timeout on Ajax Enabled Pages - Response.RedirectLocation not working

7 posts, 0 answers
  1. amonte
    amonte avatar
    24 posts
    Member since:
    Oct 2012

    Posted 19 Aug 2011 Link to this post

    We seem to be having a common problem with our web application; specifically that when the user attempts to click on a RadGrid, RadTabStrip or any other ajax enabled component on the page after the session has expired, an error occurs.  This is the specific error:

    Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 12030


    I've done several searches on this topic, and one of the solutions that was recommended was to set the  Response.RedirectLocation property in the Login page.  I have tried this to, but I have still been unsuccessful.

    As a workaround, I added a timer to my master page.  My goal was to set the interval of the timer for the 15 minute session life and than automatically redirect the user to the Login page.  The only problem is I cannot reset the timer if the user remains active, so it simply expires in 15 minutes (or whatever interval it is set to) whether the user is active or not.  I am trying to use the following code to reset the timer:

    protected void Page_Load(object sender, EventArgs e)
    {
        SessionTimer.Enabled = false;
        SessionTimer.Interval = 30000;
        SessionTimer.Enabled = true;
    }

    The code is being called, but it is not effecting the timer. 

    Any ideas on how to implement this solution?

    Thanks,
    Jerry


  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 24 Aug 2011 Link to this post

    Hello Jerry,

    I would suggest you to refer to the following forum thread which elaborates on this matter and provide several approaches. The post is actually for the old classic RadControls however as the issue is generic MS Ajax issue and not specific RadAjax issue the same should help in your application.

    Greetings,
    Maria Ilieva
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. amonte
    amonte avatar
    24 posts
    Member since:
    Oct 2012

    Posted 29 Aug 2011 Link to this post

    Maria,

    Thank you for your response, but once again, this solution does not work.

    Based on the contents of this thread, I tried the following code in my Logon.aspx Page_Init

    Response.RedirectLocation = Request.Url.ToString();

    But just as I described in my first post, I still get the following error:

    Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 12030


    Please advise.

    Regards,
    Jerry
  4. Stacy
    Stacy avatar
    116 posts
    Member since:
    Dec 2010

    Posted 18 Oct 2011 Link to this post

    I would like a reply as well as I also have this issue, and apparently many others, and the solution provided does nothing.
  5. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 20 Oct 2011 Link to this post

    Hello Stacy,

    As I mentioned in my previous post the mentioned issue is actually a generic MS Ajax issue and is not directly related to RadAjax. Please let me know if the same issue appear when using regular asp UpdatePanels. As soon as a fix could be applied for scenario with regular asp UpdatePanels the same will be applicable with RadAjax controls.

    All the best,
    Maria Ilieva
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  6. Stacy
    Stacy avatar
    116 posts
    Member since:
    Dec 2010

    Posted 21 Oct 2011 Link to this post

    When I put "Response.RedirectLocation = Request.Url.ToString();" into my login page "Page_Init" function, i do not get a MS error when the session times out, nor do i get redirected to the login page (which is what i want)....instead my grid refreshes with 0 rows (as if datasource is null), then if i perform an action again, the grid reloads with data.  There is no redirect, which is what i want.
  7. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 26 Oct 2011 Link to this post

    Hello Stacy,

    Have you tried using the RadAjaxManager.Redirect() method in order to redirect the page. If not, please give this a try and let me know how it goes.

    Regards,
    Maria Ilieva
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top