locked
Breaking the security inheritance of a site (C#) RRS feed

  • Question

  • The following code snippet breaks the security inheritance of a list.

            string siteUrl = "http://MyServer/sites/MySiteCollection";
           
    ClientContext oContext = new ClientContext(siteUrl);
            SP
    .List oList = oContext.Web.Lists.GetByTitle("Announcements");
            oList
    .BreakRoleInheritance(true, false);
            oContext
    .ExecuteQuery();

    How can I do the same for a site? Reference: http://msdn.microsoft.com/en-us/library/ee535228.aspx

    Thursday, January 19, 2012 6:50 PM

Answers

All replies