特定のユーザーのフォルダへのアクセスを制限します。vb.net.In を使用して、変数に username と pwd を渡しています。しかし、その行で上記のようなエラーが発生しています。変数 mailid と pwd には、xx や yy などの値が含まれています
code
----
Dim FolderPath As String = "D:\ABC\2011\TAccount\HA\" 'Specify the folder here
Dim UserAccount As String = mailid \ pwd
Dim FolderInfo As IO.DirectoryInfo = New IO.DirectoryInfo(FolderPath)
Dim FolderAcl As New DirectorySecurity
FolderAcl.AddAccessRule(New FileSystemAccessRule(UserAccount, FileSystemRights.FullControl, InheritanceFlags.ContainerInherit Or InheritanceFlags.ObjectInherit, PropagationFlags.None, AccessControlType.Deny))
FolderInfo.SetAccessControl(FolderAcl)