Click here to Skip to main content
15,896,527 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to apply patches...? Pin
Jeeva Jose25-Dec-07 22:20
Jeeva Jose25-Dec-07 22:20 
Generalclass design Pin
netJP12L25-Dec-07 10:56
netJP12L25-Dec-07 10:56 
GeneralRe: class design Pin
KaptinKrunch26-Dec-07 9:26
KaptinKrunch26-Dec-07 9:26 
QuestionHow to validate the inputs Pin
Kefaleas Stavros25-Dec-07 10:26
Kefaleas Stavros25-Dec-07 10:26 
AnswerRe: How to validate the inputs Pin
Ed.Poore25-Dec-07 14:48
Ed.Poore25-Dec-07 14:48 
AnswerRe: How to validate the inputs Pin
KaptinKrunch26-Dec-07 8:06
KaptinKrunch26-Dec-07 8:06 
GeneralEffective Security Access Check Pin
Jeffrey Walton25-Dec-07 7:42
Jeffrey Walton25-Dec-07 7:42 
GeneralRe: Effective Security Access Check Pin
Jeffrey Walton25-Dec-07 8:05
Jeffrey Walton25-Dec-07 8:05 
Here's what I have hacked so far. There are two problems.

1) I can't seem to work with GetAccessRule()
2) I don't know how to make the compare, even though I believe I have all the players assembled.

Jeff

DirectoryInfo information = new DirectoryInfo(directory);
DirectorySecurity security = information.GetAccessControl();

WindowsIdentity user = WindowsIdentity.GetCurrent();
SecurityIdentifier sid = user.User;

// Passing sid below will not compile
AuthorizationRuleCollection rules =
security.GetAccessRules(false, true, /*???*/);

// How is the check performed?
if( HasWriteAccess( rules ) )
GeneralRe: Effective Security Access Check Pin
martin_hughes26-Dec-07 2:11
martin_hughes26-Dec-07 2:11 
GeneralRe: Effective Security Access Check Pin
Jeffrey Walton28-Dec-07 8:08
Jeffrey Walton28-Dec-07 8:08 
GeneralRe: Effective Security Access Check [modified] Pin
martin_hughes28-Dec-07 9:28
martin_hughes28-Dec-07 9:28 
GeneralI ate too much... and another nice C# 3.0 feature Pin
martin_hughes25-Dec-07 6:17
martin_hughes25-Dec-07 6:17 
GeneralRe: I ate too much... and another nice C# 3.0 feature Pin
Jeffrey Walton25-Dec-07 7:39
Jeffrey Walton25-Dec-07 7:39 
GeneralRe: I ate too much... and another nice C# 3.0 feature Pin
martin_hughes25-Dec-07 7:50
martin_hughes25-Dec-07 7:50 
GeneralRe: I ate too much... and another nice C# 3.0 feature Pin
Waleed Eissa25-Dec-07 17:09
Waleed Eissa25-Dec-07 17:09 
GeneralRe: I ate too much... and another nice C# 3.0 feature Pin
martin_hughes26-Dec-07 2:28
martin_hughes26-Dec-07 2:28 
GeneralExercise Solution Pin
Kefaleas Stavros24-Dec-07 23:52
Kefaleas Stavros24-Dec-07 23:52 
GeneralRe: Exercise Solution Pin
Luc Pattyn25-Dec-07 0:58
sitebuilderLuc Pattyn25-Dec-07 0:58 
GeneralA simple paint program-C# Pin
Ali Rahimei24-Dec-07 22:48
Ali Rahimei24-Dec-07 22:48 
GeneralRe: A simple paint program-C# Pin
Luc Pattyn25-Dec-07 1:00
sitebuilderLuc Pattyn25-Dec-07 1:00 
GeneralRe: A simple paint program-C# Pin
Paul Conrad25-Dec-07 10:33
professionalPaul Conrad25-Dec-07 10:33 
GeneralA simple paint program-C# Pin
Ali Rahimei24-Dec-07 22:46
Ali Rahimei24-Dec-07 22:46 
GeneralRe: A simple paint program-C# Pin
Giorgi Dalakishvili24-Dec-07 23:03
mentorGiorgi Dalakishvili24-Dec-07 23:03 
QuestionHow i can user User Control in my own Form Pin
wasimsharp24-Dec-07 21:23
wasimsharp24-Dec-07 21:23 
AnswerRe: How i can user User Control in my own Form Pin
Xmen Real 25-Dec-07 2:53
professional Xmen Real 25-Dec-07 2:53 

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.