0

When I try to access my home page with an unauthenticated user I am receiving a blank page.

If I debug the code in the Global.asax.cs Appliaction_Error() I am receiving this error There is no action defined with the specified name "ViewLayout" for permission set "Controls".

I've tried that:

 Guid everyOneRoleId = new Guid("86ae86b4-7617-4ab3-bc30-b98aaabf68cc");
 Permission permission = pageManager.GetPermission(
     SecurityConstants.Sets.LayoutElement.View,
     pageManager.GetSecurityRoot(false).Id,
    everyOneRoleId );

 if (pa == null)
 {
     pa = pageManager.CreatePermission(
         SecurityConstants.Sets.LayoutElement.View,
         pageManager.GetSecurityRoot(false).Id,
         everyOneRoleId );

     pageManager.GetSecurityRoot(false).Permissions.Add(permission);
     pageManager.SaveChanges();
 }

But it didn't worked.
Documentation:
https://docs.sitefinity.com/for-developers-crud-operations-with-permissions

mihkov
  • 1,171
  • 13
  • 37
  • Are you using a custom widget? If so what kinda Forms or MVC? – Jon R. Sep 28 '17 at 17:39
  • The code that you are seeing is from a Web Form page `(aspx)`. meanwhile I am logged in with administrator – mihkov Sep 29 '17 at 15:15
  • The support team said that the "ViewLayout" is a permission only for layout controls not for other. Somehow a layout permission was added to wrong control. – mihkov Sep 29 '17 at 15:17
  • Are you still faced with this issue? – Jon R. Nov 01 '17 at 13:31
  • No, the bug was in the database which is causing errors in the whole project. This was a very annoying issue. – mihkov Nov 02 '17 at 09:55

0 Answers0