我想创建只有所有者可以访问的文件夹。
我试图这样做并得到此代码错误IdentityNotMappedException was unhandled
。
该文件夹将在服务器驱动器上创建,我已将服务器驱动器映射到本地驱动器。
Dim fs As FileSystemSecurity = File.GetAccessControl(Q_FilePath)
fs.AddAccessRule(New FileSystemAccessRule("Owner", FileSystemRights.FullControl, AccessControlType.Deny))
File.SetAccessControl(Q_FilePath, fs)