|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
DirectorySecurity's SetAccesControl works/not works?but it has no rights. Its marked as special permissions only. No read and execute. What could be wrong? Machine is XP SP2 .NET 2.0 and Visual Studio 2005. AddDirectorySecurity( gatewayPath, "ASPNET", FileSystemRights.ReadAndExecute, AccessControlType.Allow ); private void AddDirectorySecurity( string FileName, string account, FileSystemRights rights, AccessControlType controlType ) { DirectoryInfo dInfo = new DirectoryInfo( FileName ); DirectorySecurity dSecurity = dInfo.GetAccessControl( ); dSecurity.AddAccessRule( new FileSystemAccessRule( account, rights, controlType ) ); dInfo.SetAccessControl( dSecurity ); } |
|||||||||||||||||||||||