Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • vijay 129 posts 152 karma points
    Dec 22, 2009 @ 12:24
    vijay
    0

    Problem with Member Logout?

    I am creating Login Page using user control.I am trying to login inside based on ID and Password.It is working fine,But when i log out it is not clear those id and pass word from cache.

    So next time i try to open login page it is redirecting page which will appear after successful login.

    Please send me any code to solve the problem.

    Thanks in advance,

    vijay.

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Dec 22, 2009 @ 12:35
    Aaron Powell
    0

    What version of Umbraco are you using? If you're using version 4 then you should just use the ASP.NET controls for logging in/ logging out.

    Check the cookies, that's the most likely place that isn't being cleared. Firefox has a number of good plugins (eg - Firecookie) which allow you to see the cookies on a site

  • Tom Madden 252 posts 454 karma points MVP 4x c-trib
    Feb 16, 2011 @ 10:27
    Tom Madden
    0

    Although late, I came across the same issue and solved it with this code:

                Member m = Member.GetCurrentMember();
                Member.RemoveMemberFromCache(m);
                Member.ClearMemberFromClient(m);

                Response.Redirect("/");

    It's the ClearMemberFromClient method that removes the necessary cookie from the client.

     

  • kows 81 posts 151 karma points c-trib
    Feb 16, 2011 @ 10:36
    kows
    0

    what way do you use for loggin in?

    i always do it like this:

     

    if (Membership.ValidateUser(account.Email, account.PassWord))
    {
        FormsAuthentication.SetAuthCookie(account.Email, false);
       Response.Redirect(umbraco.library.NiceUrl(Node.GetCurrent().Id));
    }

     

       protected void LsStatus_LoggedOut(object sender, EventArgs e)
       {
           FormsAuthentication.SignOut();            
          Response.Redirect(umbraco.library.NiceUrl(Node.GetCurrent().Id));
       }

    this with custommembershiprovider.

     

     

Please Sign in or register to post replies

Write your reply to:

Draft