title: field or property \"ListItemAllFields\" does not exist exception
body: <p>Below code credit goes to Vadim Gremyachev. My goal is to grant user access permissions to certain <code>SharePoint</code> folders by using the <code>CSOM</code>. The goal I am trying to achieve is to access the library called <code>JZhu</code>, and inside <code>JZhu</code> library, I have two folders <code>folder1</code> and <code>folder2</code>. I am trying to grant <code>Reader</code> permission to <code>folder1</code>. So far the code is not working because I get exception at line 6 saying: </p>
  
  <blockquote>
    <p>field or property \"ListItemAllFields\" does not exist</p>
  </blockquote>
  
  <pre><code> ClientContext context = new ClientContext("http://myRealUrl");
   Principal user = context.Web.EnsureUser(@"myLoginAccout");
   var folder = context.Web.GetFolderByServerRelativeUrl("JZhu/folder1");
   var roleDefinition = context.Site.RootWeb.RoleDefinitions.GetByType(RoleType.Reader);  //get Reader role
   var roleBindings = new RoleDefinitionBindingCollection(context) { roleDefinition };
   folder.ListItemAllFields.BreakRoleInheritance(true, false);  //line 6
   folder.ListItemAllFields.RoleAssignments.Add(user, roleBindings);
   context.ExecuteQuery();
  </code></pre>