错误IdentityNotMappedException未处理

时间:2013-07-23 06:23:29

标签: vb.net file

我想创建只有所有者可以访问的文件夹。 我试图这样做并得到此代码错误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)

0 个答案:

没有答案