I'm trying to restrict access to a particular page, I've already read everything possible on the matter but instead of redirecting to login page Sitecore is returning a 404. I've set the loginPage="/Login" but SC returns not found on the requested page eg."/restricted" I've removed the extranet/anonymous read right to that page, if I allow it back it works fine. If I add the requireLogin="true" then it works but also restrict access to entire website, which I don't want to.

I just can't understand why when I remove requireLogin="true" SC instead of redirec to login page it returns not found 404.

Anyone can help?

Just adding a bit more info, on further investigation (yeah you know what that means, reading disassembled sitecore.kernel), I compared the two versions of the class Sitecore.Pipelines.HttpRequest.ItemResolver and look at what I found.

Sombody removed that line on sitecore 9 !!! not sure if that was intentional but it looks like a bug, and a silly one, I'll try to override that ItemResolver if I get a solution I'll post as answer

  • hmm quite upseting, just installed SC 8.2 and it works fine, installed a vanilla SC 9 did exact same thing and get 404 instead of Permission to the requested document was denied.
    – Albernazf
    Commented Dec 29, 2017 at 7:01
  • This issue is introduced into 8.2 when upgrading from update 4 to update 5 (kernel version to version The fix is applied in update 6 (kernel version
    – Calum
    Commented Mar 1, 2018 at 22:46

1 Answer 1


Yep, it's a bug, if I have time I'll report to Sitecore. So the solution is to create your own CustomItemResolver that inherits from ItemResolver. override the Process method, call the base.Process(args) (so you don't interfere on normal behavior of that processor then just check for permission the same way it is already doing but before finishing processing just set the args.PermissionDenied = flag;

If you are on that situation and didn't understand what I mean don't panic, here is a gihub with the solution for that bug. https://github.com/albernazf/Sitecore_9_permission_bug_fix

  • Please remember to mark this as the answer. Commented Dec 29, 2017 at 21:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.