Click here to Skip to main content
15,903,362 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to Create Virtual Drive? Pin
Pawan Kiran2-Mar-10 18:57
Pawan Kiran2-Mar-10 18:57 
GeneralRe: How to Create Virtual Drive? Pin
Saksida Bojan2-Mar-10 19:00
Saksida Bojan2-Mar-10 19:00 
QuestionMessage Removed Pin
2-Mar-10 9:09
Kennebel2-Mar-10 9:09 
AnswerRe: WPF Nested Grid Sizing Pin
AspDotNetDev2-Mar-10 17:12
protectorAspDotNetDev2-Mar-10 17:12 
GeneralRe: WPF Nested Grid Sizing Pin
Kennebel3-Mar-10 3:13
Kennebel3-Mar-10 3:13 
QuestionNot sure why second Access Rule is required for User account write access Pin
CTaylor892-Mar-10 8:31
CTaylor892-Mar-10 8:31 
AnswerRe: Not sure why second Access Rule is required for User account write access Pin
DaveyM692-Mar-10 10:22
professionalDaveyM692-Mar-10 10:22 
GeneralRe: Not sure why second Access Rule is required for User account write access Pin
CTaylor892-Mar-10 12:12
CTaylor892-Mar-10 12:12 
I took a good look at your CommonApplicationData class. It's easy to understand just like most of the documentation I have read on this subject. My experience how ever is different than my understanding. I took the same FileSystemRights that you are using in your class and applied them to my program. Logged on as an Administrator and I am not able to create a simple text file in the directory after I create it. As an administrator I don't have the rights to access it from the same program that created the directory. This makes no sense to me. I am applying the rights like this:

DirectorySecurity dSecurity = new DirectorySecurity();

dSecurity.AddAccessRule(new FileSystemAccessRule(
"Administrators",
FileSystemRights.Write |
FileSystemRights.ReadAndExecute |
FileSystemRights.Modify,
// InheritanceFlags.ContainerInherit |
// InheritanceFlags.ObjectInherit,
// PropagationFlags.InheritOnly,
AccessControlType.Allow));

dSecurity.AddAccessRule(new FileSystemAccessRule(
"Users",
FileSystemRights.Write |
FileSystemRights.ReadAndExecute |
FileSystemRights.Modify,
InheritanceFlags.ContainerInherit |
InheritanceFlags.ObjectInherit,
PropagationFlags.InheritOnly,
AccessControlType.Allow));

Note: the commented out sections have been tried both ways. I'm sure that I am not understanding this properly, but at this point it seems pretty crazy that it won't let me create a file from the same program that created the parent directory for the intended file. Even though I am logged in as an Administrator!!! According to MS documentation FileSystemRights.Write should give me the right as an administrator to create files. So what's up?
Craig

AnswerRe: Not sure why second Access Rule is required for User account write access Pin
CTaylor892-Mar-10 13:34
CTaylor892-Mar-10 13:34 
GeneralRe: Not sure why second Access Rule is required for User account write access Pin
DaveyM692-Mar-10 13:56
professionalDaveyM692-Mar-10 13:56 
QuestionWindows Service, FileSystemWatcher + Polling [modified] Pin
krazykoder2-Mar-10 6:23
krazykoder2-Mar-10 6:23 
AnswerRe: Windows Service, FileSystemWatcher + Polling Pin
Paulo Zemek2-Mar-10 6:36
Paulo Zemek2-Mar-10 6:36 
GeneralRe: Windows Service, FileSystemWatcher + Polling Pin
PIEBALDconsult2-Mar-10 8:50
mvePIEBALDconsult2-Mar-10 8:50 
GeneralRe: Windows Service, FileSystemWatcher + Polling Pin
Paulo Zemek2-Mar-10 9:48
Paulo Zemek2-Mar-10 9:48 
GeneralRe: Windows Service, FileSystemWatcher + Polling Pin
krazykoder2-Mar-10 10:55
krazykoder2-Mar-10 10:55 
GeneralRe: Windows Service, FileSystemWatcher + Polling Pin
PIEBALDconsult2-Mar-10 12:38
mvePIEBALDconsult2-Mar-10 12:38 
GeneralRe: Windows Service, FileSystemWatcher + Polling Pin
krazykoder2-Mar-10 9:23
krazykoder2-Mar-10 9:23 
GeneralRe: Windows Service, FileSystemWatcher + Polling [modified] Pin
Paulo Zemek2-Mar-10 9:39
Paulo Zemek2-Mar-10 9:39 
GeneralRe: Windows Service, FileSystemWatcher + Polling Pin
krazykoder3-Mar-10 9:32
krazykoder3-Mar-10 9:32 
GeneralRe: Windows Service, FileSystemWatcher + Polling Pin
Paulo Zemek3-Mar-10 13:33
Paulo Zemek3-Mar-10 13:33 
GeneralRe: Windows Service, FileSystemWatcher + Polling [modified] Pin
krazykoder4-Mar-10 6:26
krazykoder4-Mar-10 6:26 
GeneralRe: Windows Service, FileSystemWatcher + Polling Pin
krazykoder4-Mar-10 8:41
krazykoder4-Mar-10 8:41 
GeneralRe: Windows Service, FileSystemWatcher + Polling Pin
Paulo Zemek4-Mar-10 16:05
Paulo Zemek4-Mar-10 16:05 
GeneralRe: Windows Service, FileSystemWatcher + Polling Pin
krazykoder5-Mar-10 4:36
krazykoder5-Mar-10 4:36 
AnswerRe: Windows Service, FileSystemWatcher + Polling Pin
PIEBALDconsult2-Mar-10 8:44
mvePIEBALDconsult2-Mar-10 8:44 

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.