文件夹添加用户管理权限 的问题

waxic 2007-04-26 11:55:36
// Create a new DirectoryInfo object.
DirectoryInfo dInfo = new DirectoryInfo(FilePath);

// Get a DirectorySecurity object that represents the
// current security settings.
DirectorySecurity dSecurity = dInfo.GetAccessControl();

// Add the FileSystemAccessRule to the security settings.
dSecurity.AddAccessRule(new FileSystemAccessRule(Account,
Rights,
ControlType));

// Set the new access settings.
dInfo.SetAccessControl(dSecurity);

在msdn上看到的这个函数, 但是使用后在ACL中看不到已经添加的权限. 谁能帮忙看看啊
...全文
245 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
tianjh 2007-07-04
  • 打赏
  • 举报
回复
找到原因了,是因为你的WEB应用程序本来就运行在低权限模式下,它是无权为其它目录设置更高的访问根限的.
tianjh 2007-07-04
  • 打赏
  • 举报
回复
也是没动静.
tianjh 2007-07-04
  • 打赏
  • 举报
回复
我来试一下
waxic 2007-04-26
  • 打赏
  • 举报
回复
没人??
yumanqing 2007-04-26
  • 打赏
  • 举报
回复
UP

110,524

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧