IIS7 – Cannot read configuration file due to insufficient permissions

The last time I intensively used IIS (Internet Information Services) was back in the year 2000 when I hosted a ASP site on the local Windows 2000 server. Since then, Apache has become my only friend in the web server world.

Fast forward to present day with the current job where Microsoft technology is heavily based on, it’s time for me to get back on track with “almost-everything” Microsoft.

Today, I tried to set up an Asp.net site on my local machine with IIS7, and I got the following error:

Config Error: Cannot read configuration file due to insufficient permissions
Config File: C:\Users\me\Documents\wwwroot\httpdocs\web.config

To fix this problem, we need to grant the read permission to IIS_IUSRS on ‘httdocs’ folder.

Credit: forums.asp.net

About these ads
Tagged ,

26 thoughts on “IIS7 – Cannot read configuration file due to insufficient permissions

  1. csokun says:

    I see apache structure invade IIS

  2. Nick Watts says:

    Thank you! Just what I was looking for.

  3. Nikhil says:

    Thank you.I was searching for this exactly

  4. Kemal says:

    Thanks in advance. Very simple and very clear.

  5. Michael says:

    Great! Short and to the point! Very helpful blog post, many thanks!

  6. Kenno says:

    I’m glad to see that this post could help a few people who encountered this error for the first time.

  7. Jesper says:

    Well I got this problem.. says just that.. I have given permission.. on all files NOW.. :P
    still does not work.. Please guys need some help!

  8. Nabeel Herzalla says:

    I added the permission full control for IISUser but still getting the same error

  9. hajikelist says:

    exactly the same boat, trying to get back up to speed on .NYET after almost ten years away. My first reaction is pure horror. It’s like stepping back in time somehow; reduced flexibility, crippled dynamic languages, and user interfaces that seem to be geared at low-end IT personnel rather than Software Engineers…

    • kenno says:

      All I can say is good luck and wish you get back on track soon. As of this writing, I no longer have to use or maintain Windows system anymore. :)

  10. royal charlie says:

    Got this working alright but not based on suggestions above. My case is that am getting the 500 error running iis7 on a windows 2008 server in a domain. Just added a new user in the domain and basically allow read/execute access to the virtual directory or folder. Ensure that the virtual folder>basic settings> Connect As > Path credentials is set to a user with read/xecute access. You can test settings and both authentication and authorization should work. Cheers!

  11. JOCKpost says:

    THANK YOU THANK YOU THANK YOU!!!!!!!!

  12. Bkwdesign says:

    Yeah, also a hybrid developer that has been mostly LAMP but getting back to MS for a single project.

    In my case, I had a added an application under the Default Web Site. The folder for the application indeed needed the IIS_IUSR permissions you suggested. Thx for the tip!

  13. Adam says:

    Thanks for a clear, simple set of instructions on how to solve the problem. They were so easy to follow that in solving this problem, I ended up with a 401.3 error that I have to solve now. ;) (Not your fault, though…a different error = progress).

  14. Ferdinand says:

    My asp file is not oppening ..errror is d same. Http 500 pleez help asap!!!html iz obv opening but asp isnt… I did oly d settings from control panel

  15. Sameel says:

    I found the solution :)

    1. Add IIS_IUSRS with Read permission on web.config
    2. Change IIS authentication method to BasicAuthentication
    3. Try, and it works!

  16. abc says:

    Change IIS authentication method to BasicAuthentication

    where to change this?

    • Jezzrel says:

      highlight your default website, then under authentication click on open feature or simply double click to open thn from the list,select basic authentication and click on enable under actions.

  17. Some Person says:

    There should be a way to like this without having a wordpress account. This article was useful to me but I can’t easily like with without signing up for WordPress. I think more people should support Windows Live Authentication.

  18. Arvind Sharma says:

    HTTP Error 500.19 – Internal Server Error
    The requested page cannot be accessed because the related configuration data for the page is invalid.
    Detailed Error Information
    Module IIS Web Core
    Notification Unknown
    Handler Not yet determined
    Error Code 0×80070005
    Config Error Cannot read configuration file due to insufficient permissions
    Config File \\?\C:\HostingSpaces\sunetbus\bhagyodaylogistics.in\wwwroot\web.config
    Requested URL http://www.bhagyodaylogistics.in:80/login.aspx
    Physical Path
    Logon Method Not yet determined
    Logon User Not yet determined
    Config Source

  19. Juan_Ligas says:

    if you are just testing the IIS tool, the best way to avoid this “denied access” problems is not to use the C:\Users folder.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: