none
Cannot read configuration file due to insufficient permissions

    Question

  • It has been a while I am working on it but it's still unresolved.

    Problem:
    I have configured IIS 7.0 (on Windows Vista) to work with a WCF project I have.

    When I type http://localhost/ProductsService/ProductsService.svc it should show the WCF service file but it shows me the following error message:

    HTTP Error 500.19 - Internal Server Error

    The requested page cannot be accessed because the related configuration data for the page is invalid.

     

    Module IIS Web Core
    Notification BeginRequest
    Handler Not yet determined
    Error Code 0x80070005
    Config Error Cannot read configuration file due to insufficient permissions
    Config File \\?\C:\Users\PooyaK\Documents\Microsoft Press\WCF Step By Step - Test\Chapter 1\ProductsService\ProductsService\web.config

    Requested URL http://localhost:80/ProductsService/ProductsService.svc
    Physical Path C:\Users\PooyaK\Documents\Microsoft Press\WCF Step By Step - Test\Chapter 1\ProductsService\ProductsService\ProductsService.svc
    Logon Method Not yet determined
    Logon User Not yet determined


    My tries:

    The web.config file I am using is valid and I have tried all the resolutions suggested here http://support.microsoft.com/kb/942055/ but unfortunately none has resolved it.


    I really appreciate if anyone can help resolving this.


    Tuesday, October 28, 2008 12:19 PM

Answers

All replies

  • I found the solution :)

    1. Add IIS_IUSRS with Read permission on ProductsService.svc file as well as web.config
    2. Change IIS authentication method to BasicAuthentication
    3. Installing WCF extension in IIS using http://msdn.microsoft.com/en-us/library/ms732012.aspx
    4. Try, and it works!
    • Marked as answer by Dynamic Tuesday, October 28, 2008 1:01 PM
    Tuesday, October 28, 2008 1:01 PM
  • Hi

    it seems you need to give extra permisions for IIS Users.

    First, make sure you've installed all prerequisites  before testing your WCF service.

    Here I have Windows Vista Home Premium, installed the prerequisites and gone to Start - > Internet Information Service (IIS) Manager (this is the 7.0 version).

    Add your WCF service application as described by Chaks on http://www.geekzone.co.nz/vs2008/4653.

    Later adding your app in IIS, right click on your app, select Edit Permissions

    Click on Security tab.

    Type   <YOUR_MACHINE>\IIS_IUSRS, click ok, and ok again

    go to Internet Explorer and type http://localhost/YourApp/YourService.svc

    and your done!!


    • Proposed as answer by Junior Mayhe Saturday, July 18, 2009 4:22 PM
    Saturday, July 18, 2009 4:21 PM
  • Thanks Dynamic!! This worked
    Tuesday, January 11, 2011 1:25 PM
  • Hi

    I have install windows 7 64bit o/s.

    I am getting this error. Is there anybody here who can explain me the process of it. I don't understand anything of if. I am user of IIS 6.0 but windows 7 comes with IIS 7.0.

    I don't know how to set up. I just copied my website for old computer to new o/s. and it doesn't work.

    I am gettting following error:

     

    HTTP Error 500.19 - Internal Server Error

    The requested page cannot be accessed because the related configuration data for the page is invalid.

     

    <fieldset><legend>Detailed Error Information</legend>
    Module IIS Web Core
    Notification Unknown
    Handler Not yet determined
    Error Code 0x80070005
    Config Error Cannot read configuration file due to insufficient permissions
    Config File \\?\C:\Old Computer\Drive E\Sites\msec\www\web.config
    Requested URL http://localhost:89/login.asp
    Physical Path  
    Logon Method Not yet determined
    Logon User Not yet determined
    </fieldset>

    Het
    Monday, May 02, 2011 8:35 PM
  • Kudos to you Junior !
    Tuesday, May 17, 2011 12:06 PM
  • Reason:

    The error code 0x80070005 is:

    E_ACCESSDENIED - General access denied error

    The “Config error” portion of the error may indicate this too, via message: “Config Error Cannot read configuration file due to insufficient permissions ”

    Solution:

    Grant Read permission to the IIS_IUSRS group for the ApplicationHost.config file or for the Web.config file indicated in the error message. Even if there is no config file at that location, the worker process identity (and/or the IIS_IUSRS group) needs at least Read access to the directory so that it can check for a web.config file in that directory.  If it’s a UNC share, you need to either run your app-pool as an account that has sufficient permission to the UNC share or configure the virtual directory with a user that has sufficient permission to the share.

    If you still see the issue, run the Process Monitor tool, reproduce the error and look for “Access Denied” in the “Result” column. You can then configure the required permissions accordingly.

    Source :  http://blogs.msdn.com/b/webtopics/archive/2010/03/08/troubleshooting-http-500-19-errors-in-iis-7.aspxScenario 8

     

    Tuesday, July 12, 2011 2:26 AM
  • 
    
    Thank you very much!!
    Wednesday, April 25, 2012 11:30 PM
  • I found the solution :)

    1. Add IIS_IUSRS with Read permission on ProductsService.svc file as well as web.config
    2. Change IIS authentication method to BasicAuthentication
    3. Installing WCF extension in IIS using http://msdn.microsoft.com/en-us/library/ms732012.aspx
    4. Try, and it works!

    I have tried this, however, can't seem to add IIS_IUSRS to anything, folders, files, anything.

    We're not running WCF as far as I know, but are wanting to host a Web Service (WebMethod) (?). Same genre?

    I've verified there is an IIS_IUSRS in the local system, just doesn't want to add it.

    Running Windows 7 Pro in an Active Directory Domain environment.

    Wednesday, May 30, 2012 10:16 PM
  • Just a note, because I ran into this today. With IIS 7.5, the application pool user has changed. See:

    http://learn.iis.net/page.aspx/624/application-pool-identities/

    You can change the pool user back to NetworkService, but by default on 7.5, it is AppPoolIdentity, not NetworkService.

    I freaking wasted the better part of the day on this. I have a Windows Web Server 2008, that I started out pre-R2 build, and upgraded to R2. A work server started out as a full version of Windows Server 2008 R2. I set the application settings, permissions, and directory permissions the same between the two servers, but no matter what I did, I kept getting permission errors all over the place on the full version of Web Server 2008 that I was trying to get going.

    The above link explains why. I set it back to NetworkService and everything "just worked", because that is what I set the directory permissions for.

    It says you get better isolation not using NetworkService, but we only run one website on this server, so it isn't an issue at the moment.

    Holy, cow, I want my wasted day back.


    Tuesday, August 14, 2012 10:25 PM