SecurityDemandFailException

Posted by Community Admin on 03-Aug-2018 21:27

SecurityDemandFailException

All Replies

Posted by Community Admin on 20-Jan-2011 00:00

This piece of code use to work however, now i get this error in my SiteFinity project ..

var pgs = App.WorkWith().Pages().Where(pk => pk.Name == root).Get().SingleOrDefault() as PageNode;

Error : SecurityDemandFailException

Telerik.Sitefinity.Pages.Model.PageNode, Telerik.Sitefinity.Model was not granted View in Pages for principals with IDs 00000000-0000-0000-0000-000000000000

I'm not sure why the code is not working anymore

Thanks in advance.
Jon

Posted by Community Admin on 20-Jan-2011 00:00

Hello Jon,

The anonymous user does not have permissions to see the page you are trying to get. This is why you get this error. The user you use ( or anonymous)  should have view permissions over this page.

Kind regards,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 20-Jan-2011 00:00

All the pages in SiteFinity have permissions set at 'everyone' already. Could it possibly be something else ? Can you try the code yourself in the latest release of SiteFinity ? I'm not sure whats going on here . Any other ideas ?

Regards.
Jon

Posted by Community Admin on 20-Jan-2011 00:00

Hi Jon,

If I have "View" permissions the code below works fine. You can try this by authenticating yourself with an administrator and then executing the code.

Regards,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed