Handling expired content and windows authentication.

Vote:
 

When users try to access expired pages, they do not get a blank page or nice friendly message that the page is no longer available. Instead, they are getting the pop up to log into the server which causes confusion.

I'm in the process of digging into this in more detail to see what events happen before the login window is brought up, but has anyone else ran into a similar situation?

#54442
Oct 14, 2011 17:39
Vote:
 

// EPiServer.PageBase

public virtual void AccessDenied()

{

    PageBase.log.Warn("1.1.1 Access denied");

    if (this._accessDenied == null)

    {

        this._accessDenied = AccessDeniedDelegateHandler.CreateAccessDeniedDelegate();

    }

    this._accessDenied(this);

}

#54443
Oct 14, 2011 22:09
Vote:
 

Thanks Anders, I actually ran into an issue with that exact chunk of code doing WIF integration and it solved the problem there, but doesn't here.

In my current implementation I've overridden and added breakpoints to the base implementation calls of both the AccessDenied and the GetPage functions.  GetPage throws an AccessDenied exception, however, AccessDenied is never called.

 

public override void AccessDenied()
{
    base.AccessDenied();
}

public override PageData GetPage(PageReference pageLink)
{
    return base.GetPage(pageLink);
}

    

I can hit the breakpoint on return base.GetPage but never on AccessDenied. If I catch the AccessDenied exception in GetPage I can redirect them to the AccessDenied page.

#54480
Oct 18, 2011 17:36
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.