Wednesday, October 21, 2015

.NET DirectorySecurity Oddities

It's great that .NET has managed APIs for file and directory ACLs, but DirectorySecurity seems to be a little rickety. In particular, I've found that setting the ACL on a directory sometimes does nothing if the directory is hidden. Also, the SetAccessControl instance method on DirectoryInfo has been less reliable in my experience than the SetAccessControl static method on Directory. When I take care to avoid those pitfalls, DirectorySecurity works well.

No comments:

Post a Comment