C# code to automatically give IIS write access to a folder on Windows Server 2008? Currently throws exception
问题 I am trying to write a command line tool that will give IIS7.5 on windows server 2008 write access to a folder in the wwwroot, so that a web application has access to write to a specific folder within it's base directory. Formerly, you would do this by assigning the IIS_WPG group on the folder giving that group Modify access. In Server 2008 I'm trying to do the same thing with IIS_IUSRS, but an exception is ocurring. Here is the code: private static void ManagePermissions(string directory,