Inside and Out...

An attempt to understand technology better...

  Home  |   Contact  |   Syndication    |   Login
  160 Posts | 0 Stories | 12 Comments | 181 Trackbacks

News


WinToolZone - Spelunking Microsoft Technologies
I work as a developer on the Common Language Runtime (CLR) team, specifically in the areas of exception handling and CLR hosting.
Disclaimer

The information in this weblog is provided "AS IS" with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion. Inappropriate comments will be deleted at the authors discretion. All code samples are provided "AS IS" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

Twitter





Tag Cloud


Archives

Post Categories

Image Galleries

Links

Security

Continuing from my last post, the same can be achieved using SetAccessRuleProtection as shown below: using System;using System.Collections.Generic;... System.Text;using System.Security.AccessContr... System.IO;using System.Security.Principal; namespace AceInheritRemove{ class Program { static void Main(string[] args) { // Get the object and its SecDescp DirectoryInfo dir = new DirectoryInfo("e:\\kgk\\tes... DirectorySecurity sec = dir.GetAccessControl(Access... sec.SetAccessRuleProtection...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

.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...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati