Incorrect behavior when custom item set into Context.Item?

Consider following scenario:

  • You are using MVC
  • You have a /content/page1 item
  • There is some specific requirement, that for specific users, request on this URL should end with custom 404 error page
  • You will implement custom 404 handlers in the httpRequestBegin pipeline following way
  • You test it for some non-existing page (/content/some-page-does-not-exists), and everything works correctly (404 page is displayed)
  • You try to access /content/page1, and …. regardless that in httpRequestBegin processor you injected your 404 page into the Sitecore.Context, original /content/page1 appears
Continue reading Incorrect behavior when custom item set into Context.Item?