Click here to Skip to main content
15,885,365 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: Custom buttons for windows application Pin
Nuri Ismail15-Sep-09 1:23
Nuri Ismail15-Sep-09 1:23 
GeneralRe: Custom buttons for windows application Pin
shashikanthtalupuru15-Sep-09 3:28
shashikanthtalupuru15-Sep-09 3:28 
AnswerRe: Custom buttons for windows application Pin
Nuri Ismail15-Sep-09 3:50
Nuri Ismail15-Sep-09 3:50 
AnswerRe: Custom buttons for windows application Pin
rakesh_choudhury16-Sep-09 20:42
rakesh_choudhury16-Sep-09 20:42 
QuestionError when getting user input text when running the installer in vb.net Pin
delSaj13-Sep-09 23:45
delSaj13-Sep-09 23:45 
AnswerRe: Error when getting user input text when running the installer in vb.net Pin
Jimmanuel14-Sep-09 4:00
Jimmanuel14-Sep-09 4:00 
GeneralRe: Error when getting user input text when running the installer in vb.net Pin
delSaj14-Sep-09 18:35
delSaj14-Sep-09 18:35 
QuestionPermissions and Permission Propogation Pin
Tristan Rhodes13-Sep-09 23:16
Tristan Rhodes13-Sep-09 23:16 
Hi Guys,

Scenario:
I have a .Net app that creates a new User and then assigns full read / write permissions for that user to the application Program Files and application HKLM Registry section. The application then runs under the current user and impersonates the authorised user to modify the appropriate sections when nescessary.

The permissions assignment is assigned with the following code:

//Registry - Propogated Rule
RegistryAccessRule rule = new RegistryAccessRule(LOGON_USER_NAME, RegistryRights.FullControl, InheritanceFlags.ContainerInherit | InheritanceFlags.ObjectInherit, PropagationFlags.InheritOnly, AccessControlType.Allow);
RegistrySecurity security = new RegistrySecurity();
security.AddAccessRule(rule);

//Create Test Sub Key in Registry with permissions for the MicaUser
RegistryKey root = Registry.LocalMachine.CreateSubKey(SUB_KEY_ROOT, RegistryKeyPermissionCheck.ReadWriteSubTree);
root.SetAccessControl(security);


//File System - Propogated Rule
FileSystemAccessRule rule = new FileSystemAccessRule(LOGON_USER_NAME, FileSystemRights.FullControl, InheritanceFlags.ContainerInherit | InheritanceFlags.ObjectInherit, PropagationFlags.InheritOnly, AccessControlType.Allow);
DirectorySecurity security = new DirectorySecurity();
security.SetAccessRule(rule);

//Create Test Directory in Program Files with permissions for the MicaUser
Directory.CreateDirectory(dir);
Directory.SetAccessControl(dir, security);


Problem:
When i check the registry / directory, i have full permissions for any existing folders / subkeys below the dir / subkey Root, but not for the root itself.

i.e.

HKLM\Software\MyApp\TestKey

I Assign the permisssions to MyApp, then my User has full permissions on TestKey, but i am unable to create SubKeys in MyApp, nor delete the TestKey SubKey, nor set values in MyApp. This also applies to the ACL permissions on folders.

My question is - how do i setup both propogating privelages, and full read / write permissions on the root item?

Regards

Tristan

-------------------------------

Carrier Bags - 21st Century Tumbleweed.

AnswerRe: Permissions and Permission Propogation (Update) Pin
Tristan Rhodes13-Sep-09 23:34
Tristan Rhodes13-Sep-09 23:34 
Questioni want to add 2006 and 2010 referances of Aucto cad to vb.net it will run or not Pin
lavankumar13-Sep-09 0:48
lavankumar13-Sep-09 0:48 
AnswerRe: i want to add 2006 and 2010 referances of Aucto cad to vb.net it will run or not Pin
εїзεїзεїз13-Sep-09 11:50
εїзεїзεїз13-Sep-09 11:50 
QuestionLicensing Information regd. Crystal Reports That Comes with VS2005. Pin
VikashGohil12-Sep-09 3:12
VikashGohil12-Sep-09 3:12 
AnswerRe: Licensing Information regd. Crystal Reports That Comes with VS2005. Pin
Mark Salsbery12-Sep-09 7:11
Mark Salsbery12-Sep-09 7:11 
JokeLibrary for PCI port Pin
DominusDRR11-Sep-09 8:46
DominusDRR11-Sep-09 8:46 
GeneralRe: Library for PCI port Pin
Dave Kreskowiak11-Sep-09 19:48
mveDave Kreskowiak11-Sep-09 19:48 
QuestionMessage Removed Pin
11-Sep-09 5:12
hat_master11-Sep-09 5:12 
AnswerRe: Rolling back SQL Inserts/Updates Pin
Not Active11-Sep-09 6:23
mentorNot Active11-Sep-09 6:23 
GeneralRe: Rolling back SQL Inserts/Updates Pin
hat_master11-Sep-09 6:34
hat_master11-Sep-09 6:34 
GeneralRe: Rolling back SQL Inserts/Updates Pin
Not Active11-Sep-09 7:11
mentorNot Active11-Sep-09 7:11 
Questionremove assemblies using gacutil Pin
manustone10-Sep-09 19:42
manustone10-Sep-09 19:42 
AnswerRe: remove assemblies using gacutil Pin
Henry Minute11-Sep-09 1:02
Henry Minute11-Sep-09 1:02 
AnswerRe: remove assemblies using gacutil Pin
Dave Kreskowiak11-Sep-09 4:38
mveDave Kreskowiak11-Sep-09 4:38 
AnswerRe: remove assemblies using gacutil Pin
muktaa15-Sep-09 1:03
muktaa15-Sep-09 1:03 
QuestionBatching multiple INSERTs Pin
Jörgen Sigvardsson10-Sep-09 3:27
Jörgen Sigvardsson10-Sep-09 3:27 
AnswerRe: Batching multiple INSERTs Pin
Dave Kreskowiak10-Sep-09 5:02
mveDave Kreskowiak10-Sep-09 5:02 

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.