在Windows应用程序中收到错误------文件名:redirection.config错误:由于权限不足,无法读取配置文件 [英] In Windows Application am getting error ------Filename: redirection.config Error: Cannot read configuration file due to insufficient permissions
问题描述
嗨
文件名:redirection.config错误:由于权限不足,无法读取配置文件
我正在努力Windows 8.
这是我的代码:
Hi
Filename: redirection.config Error: Cannot read configuration file due to insufficient permissions
Am working on Windows 8.
this is my Code:
using (ServerManager serverManager = new ServerManager())
{
foreach (Site s in serverManager.Sites)
{
Console.WriteLine("Site {0}", s.Name);
Console.ReadLine();
foreach (Application app in s.Applications)
{
Console.WriteLine("\tApplication:{0}", app.Path);
Console.ReadLine();
foreach (VirtualDirectory virdir in app.VirtualDirectories)
{
Console.WriteLine("\t\tVirtual Dir:{0}", virdir.Path);
}
Console.ReadLine();
}
}
}
1.在Windows中资源管理器,找到与网站关联的web.config文件。
2.右键单击web.config文件
3.单击属性。
4.单击安全选项卡,然后单击编辑。
5.单击添加。
6.在输入要选择的对象名称框中,键入computername \IIS_IUSRS,单击检查名称,然后单击确定。
注意Computername是计算机名称的占位符。
7.单击以选中读取复选框,然后单击确定。
8.在Web.config属性对话框中,单击确定。
我已尝试此步骤但仍然收到错误。
任何人都可以帮助我。
谢谢你的问候
Sam
1.In Windows Explorer, locate the web.config file that is associated with the Web site.
2.Right-click the web.config file
3.Click Properties.
4.Click the Security tab, and then click Edit.
5.Click Add.
6.In the Enter the object names to select box, type computername\IIS_IUSRS, click Check Names, and then click OK.
Note Computername is a placeholder for the computer name.
7.Click to select the Read check box, and then click OK.
8.In the Web.config Properties dialog box, click OK.
I have tried this steps but still am getting Error.
can any one help me.
Thanks Regards
Sam
推荐答案
您也可以阅读网络服务用户的权限。
You may read permission to Network services users also.
这篇关于在Windows应用程序中收到错误------文件名:redirection.config错误:由于权限不足,无法读取配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!