Handling the AjaxUpdate event of RadToolTipManager after the Session has expired when using Forms Authentication

Thread is closed for posting
1 posts, 1 answers
  1. Answer
    Telerik Admin
    Telerik Admin avatar
    1679 posts
    Member since:
    Oct 2004

    Posted 15 Jul 2008 Link to this post

    Requirements

    RadControls version

    RadControls for ASP.NET AJAX

    .NET version

    2.x

    Visual Studio version

    2005

    programming language

    C#

    browser support

    all browsers supported by RadControls


     
  2. PROJECT DESCRIPTION
    When using Forms Authentication, triggering the AjaxUpdate event of the RadToolTipManager after the session expires, leads to "Sys.WebForms.PageRequestManagerServerErrorException" error. The problem lies in the MS AJAX architecture, and goes in direct conflict with Forms Authentication, because the Forms Authentication relies on redirecting to a new page, while UpdatePanels are designed to do partial page updates and "expect" to receive partial HTML.

    The solution demonstrated in this code library uses a WebService to check whether the Session has expired, before the RadToolTip shows and triggers the callback that is to fetch its content from the server. Steps to follow:
    1. Create a web service with the [ScriptService] attribute.
    2. Define an IsLoggedIn method that checks whether the user is still logged in.
    3. Add a ServiceReference within the ScriptManager (RadScriptManager) pointing to the web service.
    4. In the OnClientBeforeShow event of the RadToolTipManager, invoke the IsLoggedIn web method - in case the user is not logged in, reload the entire page.
    5. Add in the web.config file an AJAX HTTP Handler for .asmx files.
  • Back to Top