Optimistic Developer: There is no I in TEAM Pessimistic Tester: We can’t spell BUGS without U
modified on Wednesday, June 8, 2011 1:55 PM
Optimistic Developer: There is no I in TEAM Pessimistic Tester: We can’t spell BUGS without U
modified on Wednesday, June 8, 2011 1:55 PM
Find a nice tool for generating LINQ-TO-SQL classes using tool available at http://sourceforge.net/projects/sqlmetalbuilder/[^] License: GNU General Public License (GPL)
modified on Tuesday, June 7, 2011 11:50 AM
Hi, You can try following code block to check if the directory is having Write Access. It checks the FileSystemAccessRule. string directoryPath = "C:\\XYZ"; //folderBrowserDialog.SelectedPath; bool isWriteAccess = false; try { AuthorizationRuleCollection collection = Directory.GetAccessControl(directoryPath).GetAccessRules(true, true, typeof(System.Security.Principal.NTAccount)); foreach (FileSystemAccessRule rule in collection) { if (rule.AccessControlType == AccessControlType.Allow) { isWriteAccess = true; break; } } } catch (UnauthorizedAccessException ex) { isWriteAccess = false; } catch (Exception ex) { isWriteAccess = false; } if (!isWriteAccess) { //handle notifications }