You see this error, when you try to retrieve an item or many item in LINQ ( context.List.ScopeToFolder("",true).FirstOrDefault() or context.List.ScopeToFolder("",true).ToList() ... ):
Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack
please turn on BrowseDirectories role
public static void UpdateReadPermissionLevel(SPWeb web){SPRoleDefinition role = web.RoleDefinitions["Read"];role.BasePermissions = role.BasePermissions | SPBasePermissions.BrowseDirectories;role.Update();}
1 comment:
good ..good..Thank you
Post a Comment