Sys.Services.AuthenticationService.logout makes post back !!

Last post 07-06-2009 11:29 PM by Zhi-Qiang Ni - MSFT. 1 replies.

Sort Posts:

  • Sys.Services.AuthenticationService.logout makes post back !!

    07-04-2009, 10:25 AM
    • Member
      18 point Member
    • BossDida
    • Member since 03-09-2006, 12:17 AM
    • Posts 22

     Hi all,

    I'm implementing a web site in which forms authentication and membership profile is used. I don't use a separate login page but a popup div panel that uses ajax authentication underneath.

    Everyting is fine but Sys.Services.AuthenticationService.logout() function of ajax makes a full post back. Is it supposed to in that way ? I think something is wrong with it.

    Here are code snippet that I use:

    Markup:

    <a id="linkLogout" style="cursor:pointer;" onclick="return Logout();">Exit</a>

    JavaScript:

    function Logout()
            {
                // alert('Logout method invoked !');
                Sys.Services.AuthenticationService.logout(null, onLogoutCompleted, null, '');
                //AuthenticationStatus();
                return false;
            }

    No metter what I'm doing, after Sys.Services.AuthenticationService.logout is invoked, it makes a post back.

    Do you have any sugession to prevent it form posting back the page ?

    Thanx for any help.

     

     

     

     

  • Re: Sys.Services.AuthenticationService.logout makes post back !!

    07-06-2009, 11:29 PM
    Answer

    Hi BossDida,

    I recommend that you have a look at the documentation of the authentication service class here:

    http://www.asp.net/AJAX/Documentation/Live/ClientReference/Sys.Services/AuthenticationServiceClass/default.aspx

    There is also a useful sample inside. I believe it is helpful for you.

    Best regards,

    Zhi-Qiang Ni

    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as
    Answer” if a marked post does not actually answer your question.
Page 1 of 1 (2 items)