0

I need to determine, whether an application is allowed to delete a file or directory on file system. For that purpose I currently use the approach, decribed in

How do you check for permissions to write to a directory or file?. (I it for both, files and directories)

Unfortunately, the SecurityManager.IsGranted Method is marked as obsolete. http://msdn.microsoft.com

How can I do this check by using the suggested PermissionSet property?

Community
  • 1
  • 1
My-Name-Is
  • 4,814
  • 10
  • 44
  • 84
  • 1
    Check the folder has IUSR and NETWORK SERVICES (read,write and execute) permission – Rajasekar Gunasekaran Nov 08 '13 at 14:07
  • @DavidArno Thanks for your comment. The `SecurityManager.Demand()` seems to be the right way. But way do *msdn.microsoft.com* suggest to use the `PermissionSet` instead. Are there any differences? And why do they call a method for checking the permission `Demand()`??? ... microsoft :( – My-Name-Is Nov 08 '13 at 14:18
  • @RajasekarGunasekaran Can you please provide a short sample of that? – My-Name-Is Nov 08 '13 at 14:20
  • You need to check folder permission in folder property,http://www.uwec.edu/Help/drives/permissions.htm – Rajasekar Gunasekaran Nov 08 '13 at 14:46

0 Answers0