Wednesday, July 13, 2005

System.Security.AccessControl Namespace in .NET Framework 2.0

Working with NTFS Access Control using .NET Framework 2.0

"NET Framework 2.0 ("Whidbey") has introduced a new set of classes in the Framework Class Library (FCL) that allows you to work with the NTFS Access Control Lists. You can get object owners, security descriptors, create security descriptors, and much more. All of this resides under the System.Security.AccessControl namespace.

Below is a snippet that exemplifies how to use it. Scenario: You need to create a child folder without the permissions inherited by the parent folder, but with only permissions explicitly set on the parent folder.

using System;
using System.Collections.Generic;
using System.Text;
using System.Security.AccessControl;
using System.IO;
using System.Security.Principal;

..."


System.Security.AccessControl... That's cool! I can't wait until Nov 8...

No comments: