使用vb.net设置文件夹权限。但是我的代码中出现了上面提到的错误。在这里我附上了代码。有人帮我解决那条特定的错误吗?
Dim FolderPath As String = "D:\Account\HA\" 'Specify the folder here
Dim UserAccount As String = mailid.ToString() & "\" & pwd
Dim FolderInfo As IO.DirectoryInfo = New IO.DirectoryInfo(FolderPath)
Dim FolderAcl As New DirectorySecurity
FolderAcl.AddAccessRule(New FileSystemAccessRule(UserAccount, FileSystemRights.FullControl, AccessControlType.Deny))
FolderInfo.SetAccessControl(FolderAcl
在第5行收到错误。