I am getting the message.. An error occurred loading a configuration file. Directory C:\inetpub\wwwroot\api\configuration' does not exist. Failed to start monitoring file changes
Posted on 2014-02-10
I have a Windows 7x64 development computer that is running Visual Studio 2012 update 4. I have IIS7 installed on my development computer
I want to use my local IIS to run web services code written by a former employee so that I can test and debug some methods. This code is, and has been, running on a production server for some time and generally works. It is just kicking out a weird response to one of the methods that I need to debug.
I loaded the project source code in VS2012, built and published it to my local hard drive with no errors.
I then copied the code to my local IIS7 directory tree, right-clicked on the folder containing the code in IIS7 and selected 'Convert to application".
I set the Application Pool to ASP.NET v4.0 to match the setting in the production server
I assigned the Identity value of the application to a domain user account that is a member of the local administrators group on my development computer.
In the IIS 7 basic settings dialog for the application, I set the "Connect as..." to the same user account as the application pool identity. I can click on the "Test Setting..." button and both the Authentication and Authorization tests pass.
I restart IIS7 and then navigate to the localhost URL to see if the services.svc file will run and I get the following error;
Parser Error Message: An error occurred loading a configuration file: Directory 'C:\inetpub\wwwroot\api\v4.1\Configuration' does not exist. Failed to start monitoring file changes.
Source Error: [No relevant source lines]
Source File: c:\inetpub\wwwroot\api\v4.1\web.config Line: 0
I have checked the security properties for the folder and I have given the user account I used for the Application Pool full rights. I can see that there is an actual web.config file in the folder and when checking the security of the web.config file, the user account assigned to the application pool has full rights to the file.
I put a default.htm file in the C:\inetpub\wwwroot\API\V4.1 folder and I can browse and display that file in a web browser.
Thanks in advance for any help you can provide,