Bug with App.WorkWith().Pages
I'm reporting the following as a suspected bug:
I have a very simple navigation control for building the menu, the code is as follows:
The anonymous user should have view permissions over the page object. This is why you are able to run the code without problems when you are logged in.
the Telerik team
I had the same issue, the PageManager works. I'm using
var page = PageManager.GetManager().GetPageNodes().Where(p => p.Title == "abc" && p.Parent.Title == "xyz" && p.ApprovalWorkflowState == "Published").FirstOrDefault();
Try replacing "App.WorkWith().Pages()" with "PageManager.GetManager().GetPageNodes()". I don't understand Ivan's response, You can try this workaround.
I dont think this is the case at all. Please see the attached screenshot - everyone has access to view pages.
Eric has had exactly the same problem, but got round it using the PageManager. So there is a workaround, but this appears to me to be a bug. There is no point me always using a Workaround if it is a bug because it doesn't improve Sitefinity's reliability or ease of development.
The Pages collection has backend pages which anonymous (everyone) wouldn't have access to.
I agree with you Higgsy, this is a bug. The workaround works for me since I'm not doing a lot in code and just needed to check if a page existed, which the PageManager worked like a champ for.
I'm sure it must be a bug. I extended my expression to include only the FrontEnd page location, and I still get the same error, code as follows:
I am not able to replicate the issue using the same code. I attached a short video. Could you try to replicate the issue on a new project which you can install for a minute through the Project Manager.
All the best,
the Telerik team
I have been able to resolve this issue, and it is NOT a bug. For the purpose of building my own very simple, single level navigation controls I was originally using this code: