I would like to apply a folder's Security Settings to all descendants in C#. Essentially, I would like to do the same thing as 'Replace all existing inheritable permissions on all descendants with inheritable permissions from this object' within 'Advanced Security Settings for [Folder]'.
Are there any elegant ways to approach this?
You may find the DirectorySecurity class to be useful for this.
http://msdn.microsoft.com/en-us/library/system.security.accesscontrol.directorysecurity.aspx
There may be some other valuable tools within the System.Security.AccessControl namespace
After some quality time with google and MSDN I came up with the following bit of code. Seems to work just fine.