none
access to path machine.config is denied

    Question

  • Geting a "configuration system failed to initialize" exception when I run:
      XmlSerializer xmlser = new XmlSerializer( typeof(myClass)) ;

    the inner exception is {"An error occurred loading a configuration file: Access to the path 'C:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727\\Config\\machine.config' is denied. (C:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727\\Config\\machine.config)"}

    I am running my app in the visual studio debugger. I am running as a standard user.  When I attempt to use windows explorer to grant more permissions to standard users to the Microsoft.NET\Framework folders, all the security settings are greyed.  This happens even when I log in as administrator.

    How do I give the standard user access to the Microsoft.NET folders that is necessary?

    thanks,

    Wednesday, July 08, 2009 1:09 PM

All replies

  • Hi Steve, you can try to take ownership of the folder and see the result:

     

    1. Please navigate to the target file/folder.

    2. Right-click on the file/folder and choose Properties.

    3. Click the "Security" tab and see if your current user is listed in the "Group or user names" list. If not, please click the Add button, type the name of your current user in the "Enter the object names to select " box, then click "OK" to add this group.

    4. Select the user from the list and then check the "Allow" checkbox next to "Full Control".

    5. Click the Advanced button and click the "Owner" tab. Then, press "Edit" button.

    6. Select current user from the list and check the "Replace owner on subcontainers and objects" checkbox.

    7. Click "OK" to save changes and wait for Windows Vista to transfer the ownership of all the objects on the partition.

    8. Click OK again to save changes and exit the Properties window.

     

    For other develop related issues, you can post it to MSDN forum via the following link:

     

    http://social.msdn.microsoft.com/Forums/en-US/categories

     

    Hope this helps!


    Sean Zhu - MSFT
    Monday, July 13, 2009 3:38 AM
    Moderator
  • the "add" button is greyed.  From the security tab I clicked the "edit" button, was prompted to enter the admin password, then got a properties dialog for the folder ( folder name c:\windows\microsoft.net\framework\v2.0.50727 )

    in the "users and groups" listbox the group "Users" is listed.  Down below, the Users group is shown to have read & exec, list folder contents and read rights.

    Could someone confirm that the reason the add button is greyed is because this is a system folder?

    What I still dont follow is why I am getting the "access is denied" error when using XmlSerializer.  I did post this problem to the MSDN .net framework forum and was told it was more appropriate to ask the technet security forum.

    thanks,
       
    Friday, July 17, 2009 1:27 PM