Click here to Skip to main content
15,894,405 members
Home / Discussions / C#
   

C#

 
AnswerRe: Connect to foxpro 2.6 Pin
Stanciu Vlad8-Dec-05 5:02
Stanciu Vlad8-Dec-05 5:02 
GeneralRe: Connect to foxpro 2.6 Pin
ltxuan9-Dec-05 19:49
ltxuan9-Dec-05 19:49 
GeneralRe: Connect to foxpro 2.6 Pin
Stanciu Vlad10-Dec-05 6:22
Stanciu Vlad10-Dec-05 6:22 
Questionhow to send images with in the body of mail Pin
sreesiri8-Dec-05 2:18
sreesiri8-Dec-05 2:18 
AnswerRe: how to send images with in the body of mail Pin
Curtis Schlak.8-Dec-05 2:44
Curtis Schlak.8-Dec-05 2:44 
GeneralRe: how to send images with in the body of mail Pin
sreesiri8-Dec-05 17:16
sreesiri8-Dec-05 17:16 
QuestionInstallers Pin
AlphaAddict8-Dec-05 1:50
AlphaAddict8-Dec-05 1:50 
QuestionSetting ACL inheritance on folders (Full message posted this time) Pin
Niels Holm8-Dec-05 0:51
Niels Holm8-Dec-05 0:51 
Hi there

I hope someone in here can help me with this issue.

I am trying to write a little application that recurses through a folder and sets the appropiate security on the folder, but I can't seem to get the inharitance settings to be correct.

The below code should add a user account to the ACL-list of a specified folder and set the folder security for the added account to "Modify" - applying the settings to "This folder, subfolders and files".

I've tried various combanations of Propagation- and InharitanceFlags but it still wount work like I wan't it to ;o)

I hope anyone in here can help me

// Adds an ACL entry on the specified directory for the specified account.
public static void AddDirectorySecurity(string FileName, string Account, FileSystemRights Rights, InheritanceFlags Inheritance, PropagationFlags Propagation, AccessControlType ControlType)
{
// Create a new DirectoryInfo object.
DirectoryInfo dInfo = new DirectoryInfo(FileName);

// Get a DirectorySecurity object that represents the
// current security settings.
DirectorySecurity dSecurity = dInfo.GetAccessControl();

// Add the FileSystemAccessRule to the security settings.
dSecurity.AddAccessRule(new FileSystemAccessRule(Account, Rights,
Inheritance, Propagation, ControlType));

// Set the new access settings.
dInfo.SetAccessControl(dSecurity);

}

Thanks in advance

Niels
QuestionMicrosoft.DirectX Pin
papa19808-Dec-05 0:29
papa19808-Dec-05 0:29 
AnswerRe: Microsoft.DirectX Pin
André Ziegler8-Dec-05 1:38
André Ziegler8-Dec-05 1:38 
GeneralRe: Microsoft.DirectX Pin
papa19808-Dec-05 2:41
papa19808-Dec-05 2:41 
GeneralRe: Microsoft.DirectX Pin
Russell Jones8-Dec-05 4:13
Russell Jones8-Dec-05 4:13 
QuestionYou'll have to look inside for the question Pin
Anthony Mushrow7-Dec-05 22:58
professionalAnthony Mushrow7-Dec-05 22:58 
AnswerRe: You'll have to look inside for the question Pin
Colin Angus Mackay7-Dec-05 23:25
Colin Angus Mackay7-Dec-05 23:25 
GeneralStill need some help! Pin
Anthony Mushrow8-Dec-05 1:02
professionalAnthony Mushrow8-Dec-05 1:02 
GeneralRe: Still need some help! Pin
Colin Angus Mackay8-Dec-05 1:16
Colin Angus Mackay8-Dec-05 1:16 
QuestionStored Procedure Pin
ayuba asia7-Dec-05 22:32
ayuba asia7-Dec-05 22:32 
AnswerRe: Stored Procedure Pin
Vikram A Punathambekar7-Dec-05 23:03
Vikram A Punathambekar7-Dec-05 23:03 
GeneralRe: Stored Procedure Pin
ayuba asia8-Dec-05 0:43
ayuba asia8-Dec-05 0:43 
AnswerRe: Stored Procedure Pin
Colin Angus Mackay7-Dec-05 23:38
Colin Angus Mackay7-Dec-05 23:38 
GeneralRe: Stored Procedure Pin
ayuba asia8-Dec-05 0:41
ayuba asia8-Dec-05 0:41 
GeneralRe: Stored Procedure Pin
Colin Angus Mackay8-Dec-05 0:44
Colin Angus Mackay8-Dec-05 0:44 
GeneralRe: Stored Procedure Pin
ayuba asia8-Dec-05 0:54
ayuba asia8-Dec-05 0:54 
AnswerRe: Stored Procedure Pin
Russell Jones8-Dec-05 2:27
Russell Jones8-Dec-05 2:27 
Questionupdating a dataset using a datagrid Pin
steve_rm7-Dec-05 21:45
steve_rm7-Dec-05 21:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.