Click here to Skip to main content
15,887,246 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello

I create an project with MVC 2
I used this code
ServerManager smanager = new ServerManager();
Site site=smanager.Site[0];


I have changed my IIS 7 setting so
This is running correctly in IIS7
but in VS 2010 there is an error

Filename: redirection.config
Error: Cannot read configuration file due to insufficient permissions

and I don't know how to solve this

thank you
Posted
Updated 8-Mar-19 15:06pm
Comments
sam.198979 14-May-13 6:01am    
Hi,

I got same error:
Filename: redirection.config
Error: Cannot read configuration file due to insufficient permissions

But am working on Windows 8.

I did't find this steps in Windows 8.

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.Enter the object name to select(example) Textbox will display for you type IIS_IUSRS and click check user button. as well IUSR then OK, it will be added in user list. Or Click Advanced then Click Find Now Button it shows all the users to you select the users from the users list.
7.Click OK. And and give permission for the users IIS_IUSRS and IUSR
8.Click to select the Read check box, and then click OK.
10.In the Web.config Properties dialog box, click OK.


can any one help me.

Thanks Regards
sam.198979

Apply the following cnhages in IIS7.

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.
 
Share this answer
 
Comments
dkgawriya21 17-Mar-12 8:22am    
Add user IIS_IUSRR and give the permissions with full control to web.config and restarted the solution but still same error...
Still, it doesn't work, then a correction to preserve security for the Web Server & System

You should avoid granting "This,The User" as general,generic permissions instead you grant rights to the "IUSR","IIS_USERS" at (ACLS),Server a limited level of rights of Read,Execute,List.

The "Network","Network Service" accounts should br added only if you have code that requires the older model,mode of database access.

For this CRM situation you should only apply permissions on a per directory level.

The "Admin" directories section of a CRM solution should have the least number of generic permissions granted at tthe (ACLS),server to prevent a brute force attack by a potential "Hacker"! The better permissions for the "Admin" section is the "Administrator","Root","Authenticated User" acounts only!
 
Share this answer
 
I beleive that you need to use isolatedstorage. Look at Isolated Storage in .NET to store application data[^]
 
Share this answer
 
I had trouble adding IIS_IUSRS. I kept getting a dialog box with this message in it:

An object named "IIS_IUSRS" cannot be found. Check the selected object types and location for accuracy and ensure that you typed the object name correctly, or remove this object from the selection.

This may be due to security choices at our company. Eventually when I was trying to add IIS_IUSRS I noticed that there was an option for Location: When I chose my computer instead of any of the corporate entities, I was able to add IIS_IUSRS to have read access to the directory that I made my web site in. After restarting IIS, and my web site, and making certain that the Application Pool was running under IIS_IUSRS, everything worked fine.
 
Share this answer
 
This is an old question but I got the error today and the following is what I found to fix it. I hope it helps others in the future.

I see solutions for modifying the security for the web.config file but not for the entire folder. See HTTP Error 500.19" error when you open an IIS 7.0 Webpage. For error 0x80070005 Method 2 says to add IIS_IUSRS, for the website directory (the folder containing the Web.config file). It also says to qualify with the computer name but that is probably not necessary for most of us. Perhaps qualifying with the computer name would have helped Member 11541921 in Solution 7.
 
Share this answer
 
Apply the following Changes in IIS7.

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.Enter the object name to select(example) Textbox will display for you type IIS_IUSRS and click check user button. as well IUSR then OK, it will be added in user list. Or Click Advanced then Click Find Now Button it shows all the users to you select the users from the users list.
7.Click OK. And and give permission for the users IIS_IUSRS and IUSR
8.Click to select the Read check box, and then click OK.
10.In the Web.config Properties dialog box, click OK.

Note: You must give permission for these two users(IIS_IUSRS and IUSR) do very carefully
With Friendly
David
 
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