1 18folder Active Member 257 2011 8 0 Sep 8, 2012 #1 How do i ask user for "Write" permission on a particular folder in vb.net?
S soft2050 Active Member 2,942 2010 437 0 Sep 8, 2012 #2 For simple cases, you can simple catch the UnauthorizedAccessException after doing the writing jobs to know this UnauthorizedAccessException Class - http://msdn.microsoft.com/en-us/library/system.unauthorizedaccessexception.aspx Else you can use FileIOPermission class (http://msdn.microsoft.com/en-us/library/system.security.permissions.fileiopermission.aspx) with write access and then using AppDomain.CurrentDomain.PermissionSet (http://msdn.microsoft.com/en-us/library/system.appdomain.permissionset.aspx) on the IsSubSetOf method of FileIOPermission class to check for access
For simple cases, you can simple catch the UnauthorizedAccessException after doing the writing jobs to know this UnauthorizedAccessException Class - http://msdn.microsoft.com/en-us/library/system.unauthorizedaccessexception.aspx Else you can use FileIOPermission class (http://msdn.microsoft.com/en-us/library/system.security.permissions.fileiopermission.aspx) with write access and then using AppDomain.CurrentDomain.PermissionSet (http://msdn.microsoft.com/en-us/library/system.appdomain.permissionset.aspx) on the IsSubSetOf method of FileIOPermission class to check for access
1 18folder Active Member 257 2011 8 0 Sep 9, 2012 #3 Hello soft2050, Thankyou very much for your help