I would like to make a site collection read only programmatically. I used the
Site.ReadOnly = true
, but is not working. Now I would like to remove all the permissions on the root website of the site collection. After this I would like to give all authenticated user read permissions. As last I would like to ResetRoleInheritance for all websites, libraries, lists, items, documents etc. What is the best way to do that programmatically in c#?