Click here to Skip to main content
15,899,634 members
Home / Discussions / C#
   

C#

 
AnswerRe: How do I exit the program from the main form's constructor Pin
Thomas Stockwell1-Apr-07 4:37
professionalThomas Stockwell1-Apr-07 4:37 
Questionverify user can access a file Pin
minmanmax30-Mar-07 8:43
minmanmax30-Mar-07 8:43 
AnswerRe: verify user can access a file Pin
Ed.Poore30-Mar-07 9:09
Ed.Poore30-Mar-07 9:09 
GeneralRe: verify user can access a file Pin
minmanmax30-Mar-07 10:17
minmanmax30-Mar-07 10:17 
GeneralRe: verify user can access a file Pin
Ed.Poore30-Mar-07 12:24
Ed.Poore30-Mar-07 12:24 
GeneralRe: verify user can access a file Pin
minmanmax30-Mar-07 12:52
minmanmax30-Mar-07 12:52 
GeneralRe: verify user can access a file Pin
Ed.Poore30-Mar-07 23:19
Ed.Poore30-Mar-07 23:19 
GeneralRe: verify user can access a file Pin
minmanmax2-Apr-07 8:51
minmanmax2-Apr-07 8:51 
Thanks Ed for looking at this. below is a samle that works with FileSecurity. It will list all the FileSystemAccessRules for a file. What I cant seem to figure out is how to show the results for a user that is a memeber of a group and that group has permission.

public static void ViewFileRights()
{
// Get security information from a file.
string file = @"c:\temp\FOO.TXT";

FileSecurity fileSec = File.GetAccessControl(file);

ShowFileSecurityInfo(fileSec);
Console.Read();
}
public static void ShowFileSecurityInfo(FileSecurity fileSec)
{
foreach (FileSystemAccessRule ace in
fileSec.GetAccessRules(true, true, typeof(NTAccount)))
{
Console.WriteLine("\tIdentityReference.Value: {0}", ace.IdentityReference.Value);
Console.WriteLine("\tAccessControlType: {0}", ace.AccessControlType);
Console.WriteLine("\tFileSystemRights: {0}", ace.FileSystemRights);
Console.WriteLine("\tInheritanceFlags: {0}", ace.InheritanceFlags);
Console.WriteLine("\tIsInherited: {0}", ace.IsInherited);
Console.WriteLine("\tPropagationFlags: {0}", ace.PropagationFlags);
//Console.WriteLine("\tfoobar.Value: {0}", ace.IdentityReference.CompareTo();

Console.WriteLine("GetAccessRules-----------------\r\n\r\n");
}
}
AnswerRe: verify user can access a file Pin
Vasudevan Deepak Kumar31-Mar-07 4:29
Vasudevan Deepak Kumar31-Mar-07 4:29 
QuestionGet n Set Pin
umashankergr830-Mar-07 8:34
umashankergr830-Mar-07 8:34 
AnswerRe: Get n Set [modified] Pin
J$30-Mar-07 8:40
J$30-Mar-07 8:40 
GeneralRe: Get n Set Pin
Colin Angus Mackay30-Mar-07 8:59
Colin Angus Mackay30-Mar-07 8:59 
GeneralRe: Get n Set Pin
J$30-Mar-07 10:13
J$30-Mar-07 10:13 
AnswerRe: Get n Set Pin
Vasudevan Deepak Kumar31-Mar-07 4:31
Vasudevan Deepak Kumar31-Mar-07 4:31 
QuestionAttaching my own form Pin
Esmo200030-Mar-07 8:01
Esmo200030-Mar-07 8:01 
QuestionA control as a property, or Delete Notification Pin
Cnight Stalker30-Mar-07 7:08
Cnight Stalker30-Mar-07 7:08 
QuestionXML does not like & Pin
LCI30-Mar-07 7:05
LCI30-Mar-07 7:05 
AnswerRe: XML does not like & Pin
andyharman30-Mar-07 7:32
professionalandyharman30-Mar-07 7:32 
QuestionUsing Length attribute on a string Pin
LCI30-Mar-07 6:51
LCI30-Mar-07 6:51 
AnswerRe: Using Length attribute on a string Pin
LCI30-Mar-07 6:56
LCI30-Mar-07 6:56 
QuestionCan i drag items from listboxes? Pin
sinosoidal30-Mar-07 5:41
sinosoidal30-Mar-07 5:41 
AnswerRe: Can i drag items from listboxes? Pin
originSH30-Mar-07 6:03
originSH30-Mar-07 6:03 
Questionaccess through Network with a gateway Pin
mfmaneef30-Mar-07 5:32
mfmaneef30-Mar-07 5:32 
AnswerRe: access through Network with a gateway Pin
Wayne Phipps30-Mar-07 8:24
Wayne Phipps30-Mar-07 8:24 
QuestionChanging the name of listbox element Pin
sinosoidal30-Mar-07 4:49
sinosoidal30-Mar-07 4:49 

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.