HTTP Error 500.19 - Internal Server Error 0x80070003 Cannot read configuration file


I'm getting the above error when I publish my application and move it from development to production server. Below are the error details.

Detailed Error Information

Module IIS Web Core

Notification BeginRequest

Handler Not yet determined

Error Code 0x80070003

Config Error Cannot read configuration file

Config File \?\C:\inetpub\wwwroot\WorkmenCompTest\web.config

Requested URL http://localhost:80/wictest

Physical Path C:\inetpub\wwwroot\WorkmenCompTest

Logon Method Not yet determined

Logon User Not yet determined

This website used to work previously but recently the published version stopped working due to this error. As far as I can tell, the only change was installing iTextSharp and iTextSharp xmlworker through nuget.

I have tried, without success:

  1. giving modify permission on the site folder to Everyone
  2. checking the web.config file, and using an older version of the web.config file (from when the site worked).
  3. uninstalling iTextSharp and iTextSharp XMLWorker

The project still runs without issue from Visual Studio.
asked on Stack Overflow Apr 27, 2016 by potNPan

4 Answers


This is solved. The error was caused by the folder name not matching the path for the virtual directory. Oh wow I feel dumb.

answered on Stack Overflow Apr 27, 2016 by potNPan

This is because of different physical path in the IIS.To change the physical path of application content

You can perform this procedure by using the user interface (UI), by running Appcmd.exe commands in a command-line window, by editing configuration files directly, or by writing WMI scripts. User Interface To use the UI

Open IIS Manager. For information about opening IIS Manager, see Open IIS Manager (IIS 7).

In the Connections pane, expand the Sites node and click to select the site in which your application runs.

In the Actions pane, click View Applications.

On the Applications feature page, select an application from the list and then click Basic Settings in the Actions pane.

In the Physical path box, change the path of the application content.

Click OK.
answered on Stack Overflow Jun 20, 2017 by Sagar M

DefaultAppPool application pool runs under the Network Service account. This account is local to the computer and this account does not exist on another computer. Make sure that you configure the DefaultAppPool application pool to use an account that is a domain user. Then, you can use the same account on the WorkmenComp file server. Alternatively, you can create a workgroup account on the WorkmenComp file server.

answered on Stack Overflow Apr 27, 2016 by raj_jboss

Check the applicationhost.config file under - .vs\lpsWeb-UI\config folder of your application root.

Under sites section of the config file check what the physical path points to.

If you modify those you should be able to fix the issue.

answered on Stack Overflow Jan 5, 2021 by Priyaranjan Marathe • edited Jan 5, 2021 by Shankar Ganesh Jayaraman

User contributions licensed under CC BY-SA 3.0