Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
Filename: redirection.config Error: Cannot read configuration file due to insufficient permissions

Am working on Windows 8.

this is my Code:
C#
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
Sam
Posted

1 solution

You may read permission to Network services users also.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900