Copied to clipboard

Flag this post as spam?

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


  • Steve Bentley 21 posts 64 karma points
    Apr 27, 2016 @ 15:35
    Steve Bentley
    0

    Error when logging out after authentication cookie expired

    Hi,

    When a member clicks the logout button on our website after their authentication cookie has expired (for example, they left the web page open without interaction for an hour), a YSOD is displayed with the message "This type of page is not served"

    enter image description here

    The logout code itself is in a partial view and uses the UmbLoginStatusController as in the following code:

    @{
        var loginStatusModel = Members.GetCurrentLoginStatus();
    }
    
    @if (loginStatusModel.IsLoggedIn)
    {
    
        var logoutModel = new PostRedirectModel();
        logoutModel.RedirectUrl = "/"; 
    
        using (Html.BeginUmbracoForm<UmbLoginStatusController>("HandleLogout"))
        {
             <li class="logout-li">
                 <button class="logout-button">Logout</button>
             </li>
            @Html.HiddenFor(m => logoutModel.RedirectUrl)
        }
    }
    

    Does anyone know what is causing this and whether there is a solution?

    Thanks

    Steve

  • Nathan Sleigh 109 posts 353 karma points
    Apr 28, 2016 @ 08:05
    Nathan Sleigh
    0

    Im having a similar problem, has anyone found any solution to this yet?

    Nathan

  • Nathan Sleigh 109 posts 353 karma points
    May 09, 2016 @ 14:25
    Nathan Sleigh
    0

    After some more digging I still can't find any way around it? anyone got a solution to it or are you able to point me in the right direction?

    Thanks,

    Nathan

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies