Hi
Filename: redirection.config Error: Cannot read configuration file due to insufficient permissions
In C# Windows Application.
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.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
Sampath Kambala